[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Savannah-hackers-public] vcs0 cgi errors ("502 bad gateway")
From: |
Assaf Gordon |
Subject: |
Re: [Savannah-hackers-public] vcs0 cgi errors ("502 bad gateway") |
Date: |
Tue, 21 Feb 2017 18:22:30 +0000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Feb 21, 2017 at 05:21:07PM +0000, Assaf Gordon wrote:
This just happened again (fcgiwrap on vcs0 failing with "Resource
temporarily unavailable" leading to NGINX error HTTP/502 "Bad
Gateway").
[...]
Reason is still unknown.
A wild guess:
The error is reported by NGINX,
which calls connect(2) on fcgiwrap's unix socket file.
"Resource temporarily Unavailable" corresponds to EAGAIN.
EAGAIN from connect(2) on unix socket means that
the receiving queue is full:
http://lingrok.org/xref/linux-linus/net/unix/af_unix.c#1264
Which in turns might indicate the fcgiwrap's
queue is full, and isn't accepting new connections.
Perhaps fcgiwrap is leaking some resources
(not closing connections properly?).
'dmesg' shows some 'cgit' segfaults - perhaps
when a cgi binary crashes fcgiwrap leaks ?
I'll keep an eye with:
# ss -a --unix | grep -Ei 'netid|fcgiwrap'
# lsof -p $(pgrep -d, fcgiwrap)
other suggestions and comments welcomed.
- assaf