Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
creganFL opened this issue Jan 14, 2022 · 2 comments
Open

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

creganFL opened this issue Jan 14, 2022 · 2 comments

Comments

@creganFL
Copy link

creganFL commented Jan 14, 2022

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
Copy link

amaddio commented Aug 1, 2023

Any news on this one? The max-requests-delta option behaves alike in version 2.0.21. See: #1488

@pavanvarma08
Copy link

pavanvarma08 commented Jun 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants