unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.45k stars 686 forks source link

[strict-mode] unknown config directive: max-worker-lifetime-delta #2397

Open creganFL opened 2 years ago

creganFL commented 2 years ago

Hi there,

Undocumented option max-worker-lifetime-delta triggers error unknown config directive: worker-lifetime-delta when using uSWGI in strict mode.

2022-01-13 22:35:27,587 INFO spawned: 'uwsgi' with pid 44
2022-01-13 22:35:27,598 DEBG 'uwsgi' stdout output:
[uWSGI] getting INI configuration from /app/uwsgi.ini

2022-01-13 22:35:27,599 DEBG 'uwsgi' stdout output:
[strict-mode] unknown config directive: worker-lifetime-delta

2022-01-13 22:35:27,599 INFO exited: uwsgi (exit status 1; not expected)
2022-01-13 22:35:27,600 DEBG received SIGCLD indicating a child quit
2022-01-13 22:35:27,601 INFO gave up: uwsgi entered FATAL state, too many start retries too quickly

uwsgi.ini

[uwsgi]
chdir = /app
module = wsgi
manage-script-name = true
mount = /api=wsgi:app
master = true
processes = 10
listen = 128
max-worker-lifetime = 30
max-worker-lifetime-delta = 2
threads = 10
enable-threads = True

socket = 127.0.0.1:29000
buffer-size = 8192
chmod-socket = 664
uid = alerta
gid = root
vacuum = true

die-on-term = true
show-config
stats = :1717
stats-http
alerta@18196a45c20e:~$ uwsgi --version
2.0.20

max-worker-lifetime-delta was committed to master in 2.0.19 and is still present in the latest master.

The strict mode documentation says:

while having the freedom of defining custom options in uWSGI config files is a handy features, sometimes typos will bring you lot of headaches.

Adding –strict to your instance options will instruct uWSGI config parser to raise an error when not-available options have been specified.

I don't know why this uWSGI-defined option is returning an error as if it were a user-defined option.

amaddio commented 1 year ago

Any news on this one? The max-requests-delta option behaves alike in version 2.0.21. See: https://github.com/unbit/uwsgi/issues/1488

pavanvarma08 commented 2 months ago

Related question: It works fine for max-worker-lifetime-delta but it doesnt work for max-requests-delta on 2.0.26 version (current latest version)

(venv) ➜  demo git:(master) ✗ pip freeze | grep uWSGI
uWSGI==2.0.26
(venv) ➜  demo git:(master) ✗ uwsgi --ini uwsgi/uwsgi.ini
[uWSGI] getting INI configuration from uwsgi/uwsgi.ini
[strict-mode] unknown config directive: max-requests-delta