I have a gunicorn master process which exits with exit code 11. It doesn't spit out any logs before dying (on loglevel debug), nor can I find any correlation between the dying and anything I do. Sometimes it happens quickly after startup, sometimes it works just fine for several hours. This happens in a local development environment based on docker, as well as in a production deployment with kubernetes and <insert other container runtime here>.


The postgreSQL DB doesn't initiate the connection dropping, but logs that the client reset its connection. I've followed the recommendation of gunicorn to make /tmp a tmpfs as per docs.gunicorn.org/en/latest/fa. I guess the next step is trying to run gunicorn with strace and figure out which syscall fails, and why. Oh happy days.

Interestingly enough, gunicorn dies due to a SIGSEGV

select(8, [7], [], [], {tv_sec=1, tv_usec=0}) = 0 (Timeout)
fstat(10, {st_mode=S_IFREG|000, st_size=0, ...}) = 0
fstat(12, {st_mode=S_IFREG|001, st_size=0, ...}) = 0
fstat(13, {st_mode=S_IFREG|001, st_size=0, ...}) = 0
fstat(11, {st_mode=S_IFREG|000, st_size=0, ...}) = 0
select(8, [7], [], [], {tv_sec=1, tv_usec=0} <unfinished ...>) = ?
+++ killed by SIGSEGV (core dumped) +++

Nn to reproducing that with gdb attached.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!