简体   繁体   中英

Linux Server | Tomcat 7.0 Exceptions

I am facing these exceptions regularly, everytime I have to restart the server. The Exceptions are:

exception:1 -> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet success fully received from the server was 61,316,033 milliseconds ago. The last packet sent successfully to the server was 61,316,034 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expir ing and/or testing connection validity before use in your application, increasin g the server configured values for client timeouts, or using the Connector/J con nection property 'autoReconnect=true' to avoid this problem.

exception:2 ->Exception in thread "ajp-bio-8009-exec-106" java.lang.OutOfMemoryError: PermGen space

exception:3 ->Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

The server specifications are: 1 GB RAM | 1000 GB Bandwidth

Please also give me tips on how to manage the RAM amongst the various applications on the server and how to self kill the process which are not in working now. According to my research what I believe is processes are not getting killed and the memory once allocated to them is not refreshed back and get aligned for that process till the server reboots. So please help me with this.

I will be really grateful!

Thanks & Regards Romel Jain

for the permgen space error, maybe cloud you add some jvm options (or CATALINA_OPTS) like this :

-XX:MaxPermSize=256m -XX:+CMSClassUnloadingEnabled

  • XX:MaxPermSize : permanent space size
  • XX:+CMSClassUnloadingEnabled : allow the jvm to unload unused class definitions

i was talking about this error in an old french post here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM