[ 
https://issues.apache.org/jira/browse/HTTPCORE-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Potapov updated HTTPCORE-379:
------------------------------------

    Attachment: NHttpServer.java

Attached file illustrates the problem. It is a modified async server example 
from hc.apache.org, but the file handler replaced with basic /ping handler, and 
HttpAsyncService.exception() overloaded to log exceptions occured.
After launching this server, I'm starting apache benchmark:
/usr/sbin/ab -k -c 30 -n 10000 localhost:8080/ping

After all request completed, I observe that server continues exception logging, 
and this becomes infinite process.

> HttpAsyncService.exception(...) should shutdown connection on IOException
> -------------------------------------------------------------------------
>
>                 Key: HTTPCORE-379
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-379
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.3.2
>            Reporter: Dmitry Potapov
>            Priority: Minor
>         Attachments: NHttpServer.java
>
>
> Currently, HttpAsyncService.exception(...) closes connection if response is 
> already submitted. On TCP RST packet received all futher attempts to write 
> into socket will result in IOException, but SelectionKey.readyOps() won't be 
> changed. So, if connection output buffer has some unsent data, 
> BaseIOReactor.writable() will be called again and again, but no data will be 
> written, so reactor thread will stuck.
> I suggest to shutdown connection if IOException occured, this will save from 
> infinite calls to BaseIOReactor.writable()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to