0

这是我的 uwsgi.ini 文件,

[uwsgi]
project             = myproj
base                = /apptwo
module              = %(project).wsgi
env                 = DJANGO_SETTINGS_MODULE=%(project).settings
max-requests        = 99
worker-reload-mercy = 30
need-app            = true
py-autoreload       = 3
master              = true
processes           = 4
stats               = :1717
chdir               = %(base)
http                = 0.0.0.0:9000
static-map          = /static=/tmp1/collected_static
stats               = :5050
memory-report       = true
unique-cron         = 0 -2 -1 -1 -1 python manage.py command1
unique-cron         = 5 0 -1 -1 -1 python manage.py command2
unique-cron         = 10 -2 -1 -1 -1 python manage.py command3
unique-cron         = 20 -3 -1 -1 -1 python manage.py command4

虽然应用程序每天都在完美运行,但从上述作业中,第 3 个 cron 作业每天都因以下错误而失败,并且该作业每天每 3 小时运行一次,目前作业在 3 到 60 秒内退出,并且第 3 个命令正在加载每天100万条数据以下是错误==>

Could not aquire lock for task. Exiting...

有什么方法可以找到锁无法获取的原因吗?请告知,如果我们在 uwsgi 中使用 locks 属性作为 locks =4,这些作业会采用单独的锁吗?

我们的应用程序部署在 AWS linux 中。

请告知,如果还有其他选择?

4

0 回答 0