简体   繁体   English

Linux服务器| Tomcat 7.0例外

[英]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. exception:1 - > com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:从服务器完全收到的最后一个数据包成功是61,316,033毫秒。 The last packet sent successfully to the server was 61,316,034 milliseconds ago. 成功发送到服务器的最后一个数据包是61,316,034毫秒之前。 is longer than the server configured value of 'wait_timeout'. 比服务器配置的'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. 您应该考虑在应用程序中使用之前到期和/或测试连接有效性,增加服务器配置的客户端超时值,或使用Connector / J连接属性“autoReconnect = true”来避免此问题。

exception:2 ->Exception in thread "ajp-bio-8009-exec-106" java.lang.OutOfMemoryError: PermGen space 异常:2 - >线程中的异常“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. 异常:3 - > VM初始化期间发生错误无法为对象堆保留足够的空间无法创建Java虚拟机。

The server specifications are: 1 GB RAM | server specifications为: 1 GB RAM | 1000 GB Bandwidth 1000 GB带宽

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 感谢和问候Romel Jain

for the permgen space error, maybe cloud you add some jvm options (or CATALINA_OPTS) like this : 对于permgen空间错误,也许云你添加一些jvm选项(或CATALINA_OPTS),如下所示:

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

  • XX:MaxPermSize : permanent space size XX:MaxPermSize :永久空间大小
  • XX:+CMSClassUnloadingEnabled : allow the jvm to unload unused class definitions XX:+CMSClassUnloadingEnabled :允许jvm卸载未使用的类定义

i was talking about this error in an old french post here 我在这里的旧法语帖子中谈论这个错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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