arturobernalg opened a new pull request, #730: URL: https://github.com/apache/httpcomponents-core/pull/730
`SingleCoreListeningIOReactor` caught only `CancelledKeyException` around `ServerSocketChannel#accept()`. An `IOException`, typically "Too many open files", reached `AbstractSingleCoreIOReactor#execute`, which closed the server channel and the selector. The server never accepted again, even after descriptors were freed, while `getStatus()` still returned `ACTIVE`. Reproduced with a server under `prlimit --nofile=1024:1024` and 1060 idle connections held for 5 seconds: the exception callback fires once, and a probe after the connections are released gets "Connection refused". A failed `accept()` is now reported to the exception callback and the listener keeps running. It backs off for 100 ms, as the selector keeps reporting `OP_ACCEPT` while the failure persists. With the change the same attack gives the callback repeatedly while it lasts, and the server answers again once the descriptors are released. The test exhausts the descriptors of the JVM and is skipped when the limit is too high to reach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
