Search code examples
python-3.xsanic

sanic.exceptions.RequestTimeout: Request Timeout in Sanic


I run sanic application and it raises an exception every several seconds even without any request coming in.

sanic.exceptions.RequestTimeout: Request Timeout

How to fix the issue?


Solution

  • The issue comes from the fact that the connection remains alive. Adding following configuration seems to have fixed my issue

    from sanic.config import Config
    Config.KEEP_ALIVE = False