1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-10 04:06:47 +00:00
Commit graph

9 commits

Author SHA1 Message Date
catborise
fdd7310297 feat(logs): each log line names its request, user and client address
A request gets nginx's $request_id (or a new one when it comes without a
valid one) and sends it back in X-Request-ID. The app log's lines carry
the logger, process and thread, the request ID, the signed-in user and the
client address; gunicorn's access lines carry the client address from
X-Real-IP and the same request ID, so the two logs can be joined.
2026-11-05 14:47:37 +03:00
catborise
6709681508 feat(webvirtcloud): a request waiting on a host holds one thread, not a worker
A host that is up but does not answer (a hung NFS mount, for one) keeps
a libvirt call waiting: libvirt's keepalive does not end it, since the
daemon still answers keepalives. Each such request held a whole sync
worker, and once they held every worker the panel stopped answering,
pages without libvirt too; F5 added another.

gunicorn now runs threaded workers, 4 threads each, and a worker takes
no more connections than it has threads, so one whose threads are all
busy leaves new requests to the others. A threaded worker keeps
reporting in while a thread waits, so gunicorn's timeout no longer ends
the request: the worker now exits itself when a request runs past the
timeout (600 s), and gunicorn starts a new one. Short claims expire on
that bound.

The address search runs one at a time in a process, as it did with one
request per worker.
2026-11-02 21:19:01 +03:00
catborise
8a0737ddf0 fix: no gunicorn control socket for the panel
gunicorn 26 opens a control socket in the service user's home, which
www-data cannot create, and logs an error at every start. The panel
does not use it.
2026-10-17 21:28:15 +03:00
catborise
c2d3285e0f feat(instances): a running migration can be cancelled; its time limit goes 2026-10-16 07:57:02 +03:00
catborise
09f5a837c8 fix(gunicorn): at most 8 workers, and why the timeout stays 600 s 2026-10-07 17:46:24 +03:00
herengui
4d78917c35 modify some shell scripts to make variable references safer; modify some python scripts to reduce the code complexity and cyclomatic complexity of functions. 2022-08-22 09:57:07 +08:00
catborise
4d40de1b55 Python3 & Django 2.2 Migration - Fix & Updates 2020-03-16 16:59:45 +03:00
savichev
f4f058fdcc Update gunicorn.conf.py 2015-10-29 13:37:39 +05:00
Retspen
868dda5494 Cleaned some places 2015-04-21 17:13:53 +03:00
Renamed from webvirtcloud/gunicorn.conf.py (Browse further)