Django + FastCGI - randomly raising OperationalError

前端 未结 13 1284
忘掉有多难
忘掉有多难 2020-12-31 19:24

I\'m running a Django application. Had it under Apache + mod_python before, and it was all OK. Switched to Lighttpd + FastCGI. Now I randomly get the following exception (ne

13条回答
  •  轮回少年
    2020-12-31 19:50

    Why not storing session in cache? Set

    SESSION_ENGINE = "django.contrib.sessions.backends.cache"
    

    Also you can try use postgres with pgbouncer (postgres - prefork server and don't like many connects/disconnects per time), but firstly check your postgresql.log.

    Another version - you have many records in session tables and django-admin.py cleanup can help.

提交回复
热议问题