Increase uWSGI limits

The previous defaults we set very much in favor of low resource consumption, but could easily lead to rejecting requests with 502 errors even under moderate load. The new defaults allow two worker processes and queuing up to 50 requests. 

Closes https://github.com/piku/piku/issues/393
pull/402/head
Karl Bartel 2025-05-15 17:30:11 +02:00 zatwierdzone przez GitHub
rodzic c1c08ca26c
commit 2ebcd61f36
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1146,8 +1146,8 @@ def spawn_worker(app, kind, command, env, ordinal=1):
('master', 'true'), ('master', 'true'),
('project', app), ('project', app),
('max-requests', env.get('UWSGI_MAX_REQUESTS', '1024')), ('max-requests', env.get('UWSGI_MAX_REQUESTS', '1024')),
('listen', env.get('UWSGI_LISTEN', '16')), ('listen', env.get('UWSGI_LISTEN', '50')),
('processes', env.get('UWSGI_PROCESSES', '1')), ('processes', env.get('UWSGI_PROCESSES', '2')),
('procname-prefix', '{app:s}:{kind:s}:'.format(**locals())), ('procname-prefix', '{app:s}:{kind:s}:'.format(**locals())),
('enable-threads', env.get('UWSGI_ENABLE_THREADS', 'true').lower()), ('enable-threads', env.get('UWSGI_ENABLE_THREADS', 'true').lower()),
('log-x-forwarded-for', env.get('UWSGI_LOG_X_FORWARDED_FOR', 'false').lower()), ('log-x-forwarded-for', env.get('UWSGI_LOG_X_FORWARDED_FOR', 'false').lower()),