How to find the cause of "task queue depth" warnings from waitress?

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.


It's basically an INFO (instead of WARNING) saying there are more requests than currently idle threads.

You can either bump up the threads or silence the waitress logging completely. Especially considering due to the waitress' default logging setup, it could interfere with the application loggings.

https://github.com/Pylons/waitress/issues/133#issuecomment-629992140