Eclipse crashes with “Unable to create new native thread” - any ideas? (my settings and info inside)

房东的猫 提交于 2019-11-30 11:23:27

It appears that there is not enough memory for new thread stack. On Windows, process space is 2GB. For heap you initially allocate 1Gb (-Xms option), so it's locked from the beginning. Minus 256Mb for classes (PermSize), minus JVM overhead which could be as much as 0.5Gb. So as a result, your threads have only about 256Mb for stacks, which is maximum 64 threads (256/4m).

Solution: Try to lower stack size to -Xss1024k or reduce initial heap size (-Xms).

Related reading about OutOfMemory: unable to create thread

As a side note, -XX:MaxPermSize=256m looks too small for Eclipse for EE. Better to set to 384.

Cheers, Max

I also had trouble with Eclipse Luna on Fedora 20. I've read a lot about different memory options and still couldn't figure out the problem. It drove me crazy.

Finally I realized that by default, the number of processes a regular user can have on Fedora is very limited. Content of limits.d/90-nproc.conf:

*          soft    nproc     1000

Raising this to 5000 fixed my "Unable to create new native thread" problems.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!