0

I have a small cms system running on JVM and developed with Grails. When I deploy to VPS, my Tomcat 6/7 server keeps crashing after I insert a long text into my database (e.g. 12 pages in Word). I tried to do the same procedure for shorter text and it works ok.

Tomcat leaves no logs so I don't know exactly the problem. I suspect it's the insufficient RAM memory. The VPS I have for testing has Ubuntu 12.04, 512 MB RAM and 1 thread Intel Xeon 1,8 GHz. There's also MySQL dtb running.

In my setenv.sh, I have these options: JAVA_OPTS="$JAVA_OPTS -Xms220m -Xmx220m -XX:PermSize=158m -XX:MaxPermSize=158m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tomcat7"

How can I force tomcat to log when it crashes? Do you think it might be a problem of small RAM when I have only 2 people testing the app?

Riduidel
  • 22,052
  • 14
  • 85
  • 185
Lojza Ibg
  • 658
  • 9
  • 32
  • are you sure it doesn't log? it should do a thread dump, crash report or similar, even though it doesn't log into the app logging files. – eis Oct 15 '13 at 15:33
  • What do you mean by "crashes" and what do you mean by "no logs". It is physically impossible for tomcat not to log exceptions - in the worst case they go to "catalina.out". On the other hand, if you are swallowing exceptions in a `try`/`catch` without logging then... – Boris the Spider Oct 15 '13 at 15:34
  • Possible Duplicate: http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error?lq=1 – MangO_O Oct 15 '13 at 15:40
  • I looked at all files in tomcat/logs dir and there are nothing about the crash (not even PermGen space error). By crashing I mean it stops and when I check the status, it shows "Tomcat servlet engine is not running, but pid file exists.". – Lojza Ibg Oct 15 '13 at 15:45

0 Answers0