Summary: | Allow to change body timeout per location | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Armin Abfalterer <a.abfalterer> |
Component: | mod_reqtimeout | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | micha |
Priority: | P2 | Keywords: | PatchAvailable |
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Allow to change body timeout per location
Allow to change body timeout per location |
Description
Armin Abfalterer
2015-01-13 14:27:11 UTC
> Hence, unused connections (e.g. crashed client) are never terminated.
wstunnel shouldn't depend on a timeout to see that a client has closed their end of the socket. It should be woken up when the application crash triggers the socket to be closed by the clients host OS.
Eric, that's not the point. mod_reqtimeout isn't used to enforce timeouts on cooperative clients but on (intentionally or unintentionally) uncooperative clients. I agree with Armin that HTTP clients might need different timeout settings than WebSocket clients. With the current mod_reqtimeout implementation this is impossible if HTTP clients and WebSocket clients share the same virtual server. So there is a need to address that. Do you agree? (In reply to Micha Lenk from comment #2) > Eric, that's not the point. mod_reqtimeout isn't used to enforce timeouts > on cooperative clients but on (intentionally or unintentionally) > uncooperative clients. I'm referring specifically to the quoted text about a crashed client. > I agree with Armin that HTTP clients might need different timeout settings > than WebSocket clients. With the current mod_reqtimeout implementation this is > impossible if HTTP clients and WebSocket clients share the same virtual > server So there is a need to address that. Do you agree? I agree that different body timeouts per-directory are useful for HTTP and it doesn't seem problematic, but I haven't thought enough about what it means for websockets. In trunk, there is already an idle timeout available, I am not sure if mod_reqtimeout could work in that case (it gets in the way when there is I/O, not when the connection is idle because there are no reads occurring) (In reply to Eric Covener from comment #3) > I'm referring specifically to the quoted text about a crashed client. With "crashed client" I actually meant half-open connections due to a client OS crash. > I am not sure if mod_reqtimeout could work in that case (it gets in the way > when there is I/O, not when the connection is idle because there are no > reads occurring) mod_reqtimeout assigns the wanted timeout to the socket, thus, there must not necessarily be any I/O (In reply to Armin Abfalterer from comment #4) > (In reply to Eric Covener from comment #3) > > I'm referring specifically to the quoted text about a crashed client. > > With "crashed client" I actually meant half-open connections due to a client > OS crash. Okay, I see. > > > I am not sure if mod_reqtimeout could work in that case (it gets in the way > > when there is I/O, not when the connection is idle because there are no > > reads occurring) > > mod_reqtimeout assigns the wanted timeout to the socket, thus, there must > not necessarily be any I/O I don't think that tiemout affects what you want when the caller is mostly stuck in poll/select/epoll with their own timeout passed in. You'd have to get lucky and have a read/write pending but that should be rare in wstunnel. I should elaborate, because wstunnel is non-HTTP it cannot block in either direction (where the APR socket timeout is used), it needs to poll on both for read/write. Created attachment 33116 [details]
Allow to change body timeout per location
I stripped some renamed variables from the patch that caused some extra noise.
Additionally the patch is now based on SVN branch 2.4.x, rev. 1703807.
It was successfully tested with Apache 2.4.16.
|