Can you check in your server error log to find the cause of those 502 errors?
Sorry, I should have included this in my original post, but I don’t seem to find a corresponding 502 error in the server logs.
Here is more info from the browser console.
https://snipboard.io/r0LxzT.jpg
I will also try turning on WordPress debug to see if that helps identify the issue. I’ll follow up shortly.
Found this is in the proxy_error_log
https://controlc.com/192b43b7
upstream sent too big header while reading response header from upstream
This continues to be a problem. Any insight from the plugin author would be appreciated.
Ah, this is most likely caused by the HTTP headers that QM adds when there are PHP errors on the page. If there are too many then it can cause the overall size of the headers to exceed the header size limit in Nginx.
Do you have a large number of PHP errors in your error log?
Um, I don’t think so. I do see a few ModSecurity errors (I wouldn’t say that there are “a lot,” less than 1 per 5 minutes) in my log, but there aren’t a lot (1-2 per hour) of PHP errors that are actually being generated by WordPress.
I do sometimes see some PHP warnings in Query Monitor, but again there isn’t a lot, like 2-3 per page load max, mostly there are none.
In that case do you have a bunch of cookies for the domain in your browser? Basically it sounds like the headers that QM is adding is just tipping things over the Nginx proxy header size limit.
There are 13 cookies loaded on a wp-admin page.
What constitutes a lot?
Anyway, I raised the proxy buffer limit size. And that solved the issue.
One follow up question: Do people generally keep query monitor active on production sites? I find it helpful, but I’m not sure if it would be considered a performance hit to leave the plugin running.
Thanks for your help.
There’s no reason to keep it active on prod unless you’re investigating an issue or keeping an eye on things. There’s some info in the FAQ about the performance impact of QM but it does depend on how many queries, errors, HTTP API calls, hooks etc are running.