How to deal with ERROR: JVM Error! Caused by: Java heap space

Deploying in the Mendix cloud on our Test environment, I run into this error: ERROR: JVM Error! Caused by: Java heap space. How should I deal with this? I've just no clue where to start looking. Update 1: The Settings->Server->Maximum size (in MB) is set to 1024. This did not change since the last deployment. Update 2: The problem occurs during the command "start" from m2ee. Not while running the application. I'm deploying an .mda file that used to give no problems. My actions on our test environment, from m2ee: stop unpack Project.mda start Update 3: I'm deploying on the cloud test environment: /srv/mxinstances/frattest. This is not our own environment, Mendix is doing the maintenance. I would not expect the model to be too big as it did work fine - I deployed this model without any problems end of January. Update 4: Removing the onstartup actions did not have a positive effect. Resolution: Problem is solved. It turned out to be that the Java heap had become to small for our application to deploy. Maybe the number of model changes was too big. Mendix maintenance resolved the problem by adding extra space.
2 answers

See Project settings

*"The configuration indicates whether the fields marked with (^) in the project settings dialog are for your development or your test environment.

The settings for your acceptance and production environment are configured in your runtime environment, see deployment."*

So basically, what you set here has no effect if you deploy in the cloud. The issue you're having is possibly caused by a high memory consuming action in your application when you don't have sufficient memory in the cloud. I'd try to optimize the actions that will lead to giving this error.

Edit: I thought you were deploying in the trial cloud, if you're deploying on your own server you can increase the memory in those settings. Check the link to project settings and follow the 'deployment' link. It's important to note starting the runtime itself also requires memory to load your application model. If your model is large, the default setting won't be enough.


You can set the maximum java heap size in the service console and in your project settings --> server tab. Because you're deploying in the cloud, I think your java heap exceeds your limit in the cloud. So try to change this in your project settings.