Is there a recommended way to diagnose the cause of task queue depth warnings like the one below from waitress
? Perhaps there is some way to log queued tasks / requests?
2019-04-25 14:45:23,048 WARNI [waitress.queue:122][MainThread] Task queue depth is 2
I am testing a pyramid
application on a local Windows 10 machine. I attempted to change the logging level for waitress
and waitress.queue
to "INFO" as well as setting the expose_tracebacks
argument to True
, but neither resulted in additional console output beyond the warning (no other waitress.serve
default arguments have been altered).
Versions:
The warning is very simple and directly related to the number of threads. Waitress defaults to 4 threads. A browser defaults to sending 6 requests at a time to each domain, so if you're loading a site with a few static assets (images/css/js) then you'll likely max that out and get a warning (6 - 4 = 2 as you're seeing in your post). If you bump the number of threads at least to 6 you should stop seeing the warning normally.