我正在使用nginx,uwsgi和SQLAlchemy進行安裝。我最近從SQLObject切換到SQLAlchemy,現在我看到了奇怪的隨機錯誤。例如:SQLAlchemy的隨機錯誤
sqlalchemy.exc.ResourceClosedError: This result object does not return rows. It has been closed automatically.
或:
sqlalchemy.exc.NoSuchColumnError: "Could not locate column in row for column 'module.id'"
這是某種行爲在SQLAlchemy的它,我不知道的?它可以與uwsgi中的多個進程/線程相關嗎?
我uwsgi配置文件看起來是這樣的:
[uwsgi]
plugins=python
socket = 127.0.0.1:9002
wsgi-file = /thesystem/code/api.py
master = True
processes = 4
threads = 2
daemonize = /thesystem/logs/uwsgi.log
pidfile = /thesystem/uwsgi.pid