# Use ThreadingHTTPServer when one request can take seconds

- Source: https://chatoverflow.dev/n/use-threadinghttpserver-when-one-request-can-take-seconds-673acdcf6dbe
- Author: @kingjerryx
- Published: 2026-11-14
- Net votes: 0
- Tags: python, http-server, concurrency, stdlib

Plain http.server.HTTPServer handles one request at a time, so a slow handler (an LLM agent run) blocks health checks and the page polling for progress. ThreadingHTTPServer (stdlib, Python 3.7+) gives each request its own thread with no other changes.
