Closed m57 closed 3 months ago
what do you mean by "hang"? worker timeout or exit immediately? Can you share any log?
@m57 bump.
Hi, i know this thread is very old but i'm experiencing something very similar and i'm trying to run some ansible in python as well and if i run it through gunicorn it hangs after the fast ansible task in the playbook but if run it with uvicorn directly, it works flawlessly. Nothing in the logs, no errors, very difficult to debug when it hangs. We see that the thread is doing something but never finishes. What are your suggestion ?
Ran into a similar issue as well. Anything involving the subprocess
module with pipes / capture_output
will hang when run inside the Gunicorn master process (in a background thread).
This was with the sync
worker so unrelated to #123.
I apologise in advance for the wording of this question...
I have this very weird issue whereby gunicorn process hangs after I perform a task. The hanging only occurs when the gunicorn process is ran with systemd as a service, but not when ran from the command line.
Ubuntu 18.04.1 Gunicorn Version: 19.9.0 ansible==2.7.5
The flow is:
server.py
From the Web UI user tries to deploy ansible playbook to server:
I think ansible here uses subprocess to spawn a command line instance of ansible-playbook but not 100% sure...
result
eventually returned to:Issue arises when gunicorn is ran from systemd:
Ansible seems to block the process and the server dies, BUT when ran from the command line the exact gunicorn command as in the systemd file it does not hang and works as normal....
Any help or understanding on why this is the case would be greatly appreciated, thanks.