另一种可能:The problems was solved setting Xmx parameters for example, your OS has 3 gb RAM. your java processs is -Xmx1440m, that means almost 1.5 gb . ok. your process starts, it works for a while.... but at any moment after get that much memory it ...
显示全部另一种可能:
The problems was solved setting Xmx parameters
for example, your OS has 3 gb RAM.
your java processs is -Xmx1440m, that means almost 1.5 gb .
ok. your process starts, it works for a while.... but at any moment after get that much memory it blows up saying Failed to fork OS thread.
that is because, at least in windows, allows you to allocate as max the half of memory for a process, but you are not counting on java overhead. Then, if it tries to get more "permitted" memory it will blow up because the OS is not allowing to create new threads.
my advice.
1. if you want to allocate a lot of memory, use 40% as max of the total RAM of the OS (in windows) using Xmx params.
2. also, tweak the parameter -XX:ThreadStackSize=128 to reduce it, the default is 512 and that is too much
收起