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

前端 未结 2 1189
春和景丽
春和景丽 2021-01-01 19:18

I\'m having trouble with Eclipse routinely crapping out on me (and being generally sluggish) and I was wondering if anyone could give me any insight. The message that gets t

相关标签:
2条回答
  • 2021-01-01 20:05

    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

    0 讨论(0)
  • 2021-01-01 20:16

    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.

    0 讨论(0)
提交回复
热议问题