On 7/4/07, Chris Hostetter <[EMAIL PROTECTED]> wrote:
: I set up solr1.2 to run snapshooter each time after a commit/optimize. : It worked fine for a while, but later I got the error message below : after sending the commit request. It seems jboss(4.0.GA) had problem : running snapshooter. The index size is 290m, the file system that solr : data directory is on has 2g free space. The swap space(/tmp) has 420m The message from the native code used by your JVM to do the forkAndExec seems to be a little missleading, googling for "IOException: Not enough space forkAndExec" turned up a bunch of examples where people have seem to have run into similar problems and the root cause is not enough swap. You may have 420MB of swap available, and your index size may only be 290MB but the size of your index isn't the issue -- what matters is that in order to to exec shapshooter, the JVM has to fork first, which causes your OS to make a copy of all the memory allocated to your JVM -- so whatever your heap size is, unless you have that much free mem at the time the forkAndExec call is made, it will try to use swap, if that much swap isn't available, it will fail with this error.
Right... except it's not as expensive as it sounds. OS's like Linux don't actually copy all the memory, they implement copy-on-write so all that physical ram is not used (except for the extra page tables) and swap is not actually used. But because at the time of fork() the kernel doesn't know if it will actually be followed by exec(), it checks if enough memory+swap *would* be available if needed (to avoid memory overcommit). -Yonik