The threads that run the WSGI app are pre-spawned, they wait on a new request 
to be added to a queue, peel one off, pass it down the WSGI app, and then back.

There are no other "workers". The rest is a simple asyncore loop, whereby 
requests are accepted, and added to the list of sockets to listen on. Responses 
are sent back out when asyncore signals that the socket is ready for writing. 
These are called "channels" in waitress. You can already limit the amount of 
channels (open connections). Do note that a channel does not explicitly map to 
a single request (i.e. with HTTP pipelining it could be multiple) and an open 
connection does not imply that there is an active request (and thus thread that 
is processing said request) because of HTTP keep-alive.

Look at:

--connection-limit
--cleanup-interval
--channel-timeout

For tuneables that affect how many connections can be open at once, how often 
waitress cleans up inactive channels and what the maximum time is to allow for 
HTTP keep-alive requests.

What are you trying to do with a "max requests"?

What issues?

> On Jul 17, 2018, at 16:12, Jonathan Vanasco <[email protected]> wrote:
> 
> does anyone know if the workers in waitress are spawned as-needed for each 
> request, or if they are pre-spawned and answer requests when available?
> 
> I think it is the latter.  if so, is there a reasonable chance of having a 
> max-requests feature implemented (or would this be possible to kludge 
> together myself for local testing)?
> 
> i'm trying to recreate some issues that are appearing on other wsgi 
> containers to debug within waitress, and am having a hard time.  I think the 
> problem is happening due to how the worker processes are launched.
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/905cf706-6ac6-4a7b-8afc-1381c2f7623e%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pylons-discuss/905cf706-6ac6-4a7b-8afc-1381c2f7623e%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/77C7C131-B4DC-4A18-BC93-D772FAE53B21%400x58.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to