我们正在运行 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)
如何将这些连接配置为超时?