Chris Narkiewicz
2021-04-20 22:11:02 UTC
Hi,
I have a httpd serving PHP app via FastCGI interface.
This application sends quite large data (1GB) but httpd
timeouts the connection during transfer.
What I found is the following sequence of events:
1) curl https://somehost/download/stuff
2) transfer starts
3) no mention of new conncetion in access.log and error.log
or stdout/stderr
4) 50-60s last I can see GET request in access.log
5) 60s later connection timeout event occurs
6) curl fails
I tried to trace the source of this issue but I'm not
familiar with httpd code. This is the only place where
timeout is set in fastcgi:
/usr.sbin/httpd/server_fcgi.c:369
bufferevent_settimeout(clt->clt_srvbev,
srv_conf->timeout.tv_sec, srv_conf->timeout.tv_sec);
bufferevent_enable(clt->clt_srvbev, EV_READ|EV_WRITE);
if (clt->clt_toread != 0) {
server_read_httpcontent(clt->clt_bev, clt);
bufferevent_enable(clt->clt_bev, EV_READ);
} else {
bufferevent_disable(clt->clt_bev, EV_READ);
fcgi_add_stdin(clt, NULL);
}
Nothing too suspicious here, but I can't figure out
why it timeouts despite data being actively pumped
through the connection?
Any suggestions welcome. I'm out of ideas.
Cheers,
Chris
I have a httpd serving PHP app via FastCGI interface.
This application sends quite large data (1GB) but httpd
timeouts the connection during transfer.
What I found is the following sequence of events:
1) curl https://somehost/download/stuff
2) transfer starts
3) no mention of new conncetion in access.log and error.log
or stdout/stderr
4) 50-60s last I can see GET request in access.log
5) 60s later connection timeout event occurs
6) curl fails
I tried to trace the source of this issue but I'm not
familiar with httpd code. This is the only place where
timeout is set in fastcgi:
/usr.sbin/httpd/server_fcgi.c:369
bufferevent_settimeout(clt->clt_srvbev,
srv_conf->timeout.tv_sec, srv_conf->timeout.tv_sec);
bufferevent_enable(clt->clt_srvbev, EV_READ|EV_WRITE);
if (clt->clt_toread != 0) {
server_read_httpcontent(clt->clt_bev, clt);
bufferevent_enable(clt->clt_bev, EV_READ);
} else {
bufferevent_disable(clt->clt_bev, EV_READ);
fcgi_add_stdin(clt, NULL);
}
Nothing too suspicious here, but I can't figure out
why it timeouts despite data being actively pumped
through the connection?
Any suggestions welcome. I'm out of ideas.
Cheers,
Chris