开发者

Jetty Maxidletime

When does maxidletime in jetty get trigger开发者_JS百科ed?


The maxIdleTime setting is passed to the operating system's Socket handler and becomes the timeout value for that socket. If the other end of the connection keeps the connection alive, the connection will never be closed by the OS. Jetty's Thread will wait for as long as the OS deems the connection to be still 'alive'.


The maxIdle time was originally passed to the socket sotimeout. However, now that jetty is asynchronous, it is not strictly used like that because the sotimeout only applies to blocking operations.

Instead the timeout is used in two circumstances:

1) if a connection is idle (no response outstanding), then if that timeout expires the connection will be closed.

2) if an IO operation is being attempted (normally a blocking read or write from a servlet), then the timeout is applied almost as if it were implemented with a blocking socket read and it was an soTimeout - ie if the IO read/write makes no progress for the timeout period, the operation will fail with a TimeoutException.

Note in jetty-9, maxIldeTime has been renamed idleTimeout

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜