php-fpm+nginx: long URL breaks *other* fetch requests?

Viewed 30

So this is a bit of a strange one. I noticed that one of my ajax requests is failing. Chrome devtools says net::ERR_CONNECTION_CLOSED.

If I check my nginx logs, the actual error is

2022/05/26 08:46:05 [info] 8#8: *1 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 10.244.0.217, server: , request: "GET xxx HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "xxx", referrer: "xxx"
10.244.0.217 - - [26/May/2022:08:46:05 +0000] "GET xxx HTTP/1.1" 499  0 "https://xxx" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36" "xxx"

The really weird part is that that URL is short and loads perfectly fine if I open it in a new tab. However, there's also an <img> request on that same page with a src that's dynamically generated, and this particular one grew to 7200 chars. I guess my server doesn't like that.

So my question is two-fold:

  1. Are there any settings I can tweak in either php.ini to allow longer URLs?
  2. Why is one request killing the other, and how do I prevent that? Another php.ini setting?
0 Answers
Related