我正在尝试使用 gunicorn 在 Heroku 上提供猎鹰应用程序。
我几乎遵循 falcon 文档并创建了一个基本应用程序。
在处理请求时,我正在使用 psycopg2 向每个资源添加连接游标。
web: gunicorn app:api --log-level=DEBUG --worker-class=gevent
但是现在每个请求都会导致超时:
Feb 06 18:10:01 d.19db00e4-faf8-47bc-aaea-c78a52163a24 heroku/router: at=error code=H12 desc="Request timeout" method=GET path="/" host=falcon-raptor-api.herokuapp.com request_id=3b29350f-8990-430c-92e8-02458d91a2f9 fwd="54.91.242.125" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0
我认为这是 psycopg2 或 gunicorn 或两者都有的问题。
有什么建议吗?