0

I have deployed a simple JEE app on my openshift app but when I take a look to server.log I found that a "java.lang.OutOfMemoryError: Unable to create new native thread" is avoiding wildfly from starting. I have deployed the same app locally (on a wildfly 8.1) and it works fine.

Any suggestions on how to solve the pb or how to diagnose it ?

Thanks

ElArbi
  • 101
  • This error is a thread limit exception and not an memory limitation: https://stackoverflow.com/questions/16789288/java-lang-outofmemoryerror-unable-to-create-new-native-thread. Remember that you have 250 thread/process per gear. – Federico Sierra Jan 20 '15 at 12:46
  • Thanks, Yes I have noticed this limitation but my app was working very well, till I have added a servlet filter for CORS. By the way is 250 thread/process a fit for toy apps only or we can really deploy real world app ? – ElArbi Jan 20 '15 at 13:53
  • You must sizing the requirements of the application to see if free gears have sufficient resources. OpenShift offers specific gears for use in a production environments with cost of course. – Federico Sierra Jan 20 '15 at 14:22
  • Thanks a lot. And how can I size the requirements ? any link ? – ElArbi Jan 20 '15 at 14:45
  • Take a look in: http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning, http://serverfault.com/questions/350454/how-do-you-do-load-testing-and-capacity-planning-for-web-sites, http://serverfault.com/questions/350458/how-do-you-do-load-testing-and-capacity-planning-for-databases – Federico Sierra Jan 20 '15 at 14:53

1 Answers1

0

If you are using the Wildfly cartridge take a look at:

https://github.com/openshift-cartridges/openshift-wildfly-cartridge/issues/32

It seems to be an issue with that cartridge on small gears, removing JMS might do the trick.

El Demian
  • 111