aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-10-02 17:20:10 +0000
committerOmar Polo <op@omarpolo.com>2021-10-02 17:20:10 +0000
commitb618111a681d278d0d72fbdb526542bebf8fce02 (patch)
tree42631379d3cae864f39f3a42d980c343d814d0db
parent5f37f9c20d1773ad0b95b16f67a33f75fea326f4 (diff)
log more details for FastCGI errors
add the reported request id if there's a mismatch and both the gai error and the errno value if getnameinfo fails.
-rw-r--r--fcgi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fcgi.c b/fcgi.c
index 0e11d54..8de518a 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -343,8 +343,8 @@ fcgi_read(struct bufferevent *bev, void *d)
c = try_client_by_id(recid(&hdr));
if (c == NULL) {
log_err(NULL,
- "got invalid client id from fcgi backend %d",
- recid(&hdr));
+ "got invalid client id %d from fcgi backend %d",
+ recid(&hdr), fcgi->id);
goto err;
}
@@ -463,7 +463,8 @@ fcgi_req(struct fcgi *f, struct client *c)
NULL, 0,
NI_NUMERICHOST);
if (e != 0)
- fatal("getnameinfo failed");
+ fatal("getnameinfo failed: %s (%s)",
+ gai_strerror(e), strerror(errno));
c->next = NULL;