我创建了Flask WSGI应用程序,它使用gunicorn作为WSGI服务器,对于DB,它通过Flask SQLAlchemy扩展使用PostgreSQL。这些都是在Heroku上托管的。工人人数:2人;线程数: 1;Heroku PostgreSQL configuration对于其他一切,都使用默认配置。 我得到了一个错误:sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: too...
Fix: Don't keep connections alive Limit accepted connections ton+1wherenis number of threads.n+1avoids serial chain ofaccept->threadpooland ensures better threadpool utilization. Note: diff says +2 because there's an off by one error in gunicorn logic, that doesn't matter much, we just ne...