
最近被 classloader 引发的内存泄漏弄得有点烦。。在想生产环境是不是直接 tomcat 重启算了。。。
1 kanchi240 Jan 19, 2017 一般禁止的吧 |
2 snnn Jan 19, 2017 via Android 对!!! |
3 ihuotui Jan 20, 2017 应该思考为什么内存溢出。 |
4 yidinghe Jan 20, 2017 via Android 一个办法是部署至少两个 tomcat ,使用 session 共享,前面再加个反向代理,更新时轮流重启,保证服务不中断。 |
5 darrenfang Jan 20, 2017 开发环境都经常出问题 |
6 Infernalzero Jan 20, 2017 除非不用 spring,否则热部署其实没有太大意义,都要等初始化的时间 而热部署次数多了就容易 OOM ,那还不如直接重启容器了 |
7 xiaoyangsa Jan 20, 2017 弄两台 tomcat 分开重启就行了 |
8 mN71eOOprFyMsnPx Jan 20, 2017 https://tomcat.apache.org/tomcat-7.0-doc/config/context.html reloadable Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand. |
9 cjyang1128 OP @ihuotui 找到原因了,但是感觉与其花代价去修复还不如直接禁用这个功能 |
10 domty Jan 20, 2017 一般都是 ls 那种做法 靠 nginx 负载均衡和部署多服务来实现线上服务的部署的。 只要保证任何时间都起码有一个能稳定提供服务的就行。 |
11 cjyang1128 OP @domty soga |