java服务器出现broken pipe ,connection reset解决方法
作者:互联网
2009-12-02
-
近期用java写的email服务器经常出现 broken pipe 错误。 经查验
有可能是linux的线程机制会产生JVM出错的问题,特别是在连接高峰期间经常出现这样的问题,tomcat在linux下也出现类似情况。
解决办法是在环境变量中设置: _JAVA_SR_SIGNUM = 12 基本就可以解决。
在WIN环境变量中设置: _JAVA_SR_SIGNUM =12, 若Linux下用 export _JAVA_SR_SIGNUM =12, 基本就可以解决.
sun的解释:
--posted by: cooper
Below is a clipping from Sun on working around JVM crashes under high
thread counts in the JVM 1.3 for Linux
On Linux, use a larger signal number for hotspot thread
suspension/resumption handler. The signal number being used is
specified by environment variable _JAVA_SR_SIGNUM. Setting it to a
number larger than SIGSEGV (11) will solve the problem. A good number
to use is 12, which is SIGUSR2. Using signal 16 to work around the
problem might have potential problems. So on tcsh, "setenv
_JAVA_SR_SIGNUM 12" can solve the problem.
-
相关标签:
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
拒绝硬编码!利用 Java SPI 打造一个可插拔的代码解析器
给 Spring Boot 接口加了幂等保护:Token 机制 + 结果缓存,一个注解搞定
一站式了解接口防刷(限流)的基本操作
ThreadForge v1.1.0 发布:让 Java 并发更接近 Go 的开发体验
各版本JDK对比:JDK 21 特性详解
JVM 内存溢出排查
LangChain4j Prompt 提示词工程
彻底重绘Spring Boot性能版图,资源占用缩减80%
百度智能云模型接入
CompletableFuture深度解析:异步编程与任务编排的实现
AI精选
