Is it reasonable to call settimeout() on the file-like object, if it
has such a method?
Alec
No.
> I see a few settings in the ConfigurationDirectives page which seem
> relevant
> (inactivity-timeout, etc) but none that quite do what I'm hoping for.
> I'm mostly concerned for a service we have where you can upload
> images, and we'd like to avoid tying up a wsgi daemon if there's a
> slow client - we'd rather just bail on the client.
>
> Is it reasonable to call settimeout() on the file-like object, if it
> has such a method?
No as it isn't a direct wrapper around a socket, but to an internal C
API that maps into Apache input system.
What I would suggest is that you place nginx proxy in front of
Apache/mod_wsgi. This will help as nginx, unless input content size is
over a quite sizeable value, will buffer request content before
proxying it on to the back end server. This has the effective of
isolating Apache/mod_wsgi from slow clients by only passing on a
request when data is all available for Apache/mod_wsgi to respond to
it.
Using nginx like this is a common practice albeit that most may not
understand that this is one of the favourable outcomes from using that
architecture.
Graham