jeudi 4 juin 2015

OutOfMemoryError: unable to create new native thread AWS

My Grails application is deployed in Tomcat 6 in AWS EC2 instance. The problem that I am having is that it cannot start and kept on getting the error: OutOfMemoryError: unable to create new native thread. When I ran VisualVM, it seems that a lot of threads were created, around 1,000+. I'm not quite familiar in using this tool and cannot seem to determine at which part of my code creates so much thread. One thing That I have noticed is that when I disabled hibernates 2nd level cache or changed net.sf.ehcache.hibernate.EhCacheProvider to net.sf.ehcache.hibernate.SingletonEhCacheProvider, the number of threads significantly decreased. Is there a tool that can basically help me in determining where in my code causes the massive increase in creation of threads?




Aucun commentaire:

Enregistrer un commentaire