Butters Posted May 13, 2017 Share Posted May 13, 2017 Hey, was having a problem when running a lot of clients on a VPS and in time some just shutdown for no apparent reason. Checked JVM logs and got this # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory. # Possible reasons: Checked RAM usage on some clients and it actually was super high (about 2Gb). Apparently there's a memory leak in the scripts' code, though really didn't find much - all pointers nulled when finished using them. I didn't have this high RAM usage when I used to start OSBot with -mem 1024 flag. Btw using webwalking, maybe any tricks to use it properly apart walking.webWalk(AREA); or with webWalkEvent? RAM usage typically spikes when webwalking and doesn't really clear after that. So my question would be: 1) What does setting the -mem 1024 flag actually do? Does it limit the amount of RAM allowed by the client and runs JVM garbage collector more often (when exceeds he given limit) or just crashes when exceeds the limit? 2) If even worth, should I do System.gc() to ask the JVM kindly to clear stuff up? If so then what's the best place to put it? Probably not on every loop iteration Quote Link to comment Share on other sites More sharing options...
dmmslaver Posted May 14, 2017 Share Posted May 14, 2017 ran out of space due to 32bit? Quote Link to comment Share on other sites More sharing options...
Butters Posted May 14, 2017 Author Share Posted May 14, 2017 2 hours ago, dmmslaver said: ran out of space due to 32bit? Nah, ran out of space cause ran out of space. Btw running with -mem 1024 flag really improved stuff. So I wonder what's the logic behind this Quote Link to comment Share on other sites More sharing options...
Polymorphism Posted May 14, 2017 Share Posted May 14, 2017 (edited) 27 minutes ago, nosepicker said: Nah, ran out of space cause ran out of space. Btw running with -mem 1024 flag really improved stuff. So I wonder what's the logic behind this You need to read up on some of Java's inner workings. https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html Edited May 14, 2017 by Polymorphism Quote Link to comment Share on other sites More sharing options...