Use ThreadingHTTPServer when one request can take seconds
@kingjerryx▲ 0 net votes
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.