我们正在运行jBoss 5.1,它又使用Tomcat servlet容器。
我们一直在看到坏的HTTP客户端会打开套接字,发出HTTP请求,无法读取所有数据以及无法关闭连接的情况。
结果是tomcat线程无限期地试图写入输出流而阻塞:
SocketOutputStream.socketWrite0(FileDescriptor, byte[], int, int)
SocketOutputStream.socketWrite(byte[], int, int)
SocketOutputStream.write(byte[], int, int)
InternalOutputBuffer.realWriteBytes(byte[], int, int)
ByteChunk.flushBuffer()
ByteChunk.append(byte[], int, int)
InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(ByteChunk, Response)
IdentityOutputFilter.doWrite(ByteChunk, Response)
InternalOutputBuffer.doWrite(ByteChunk, Response)
Response.doWrite(ByteChunk)
OutputBuffer.realWriteBytes(byte[], int, int)
ByteChunk.append(byte[], int, int)
OutputBuffer.writeBytes(byte[], int, int)
OutputBuffer.write(byte[], int, int)
CoyoteOutputStream.write(byte[], int, int)
如何配置这些连接超时?
最佳答案
您可以在其前面放置Apache。说真的