• I installed and activated Query Monitor on a website yesterday. Whenever we would update the order status of an order from within the individual order page, we’d see a 502 Gateway Error. Because Query Monitor was the only plugin installed before this occurred, I deactivated the plugin and the error stopped occurring. 1 GB or RAM is assigned to the website, so I can’t see it running out of memory – it’s not a very busy website at all.

    Any ideas why this is happening?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Ian,

    I ran into a similar issue myself a few weeks ago just in the regular post/block editor. I suspect that 502 was on an admin-ajax.php call/request? If so, it’s likely the same thing I ran into, which is that Query Monitor adds it’s debugging info into the response headers of the request. I can’t say for sure with Apache/Litespeed, but with Nginx, there is a limit to the size of the buffers used for the headers, which will cause a 502 error when one of those response headers exceeds the buffer size. See https://stackoverflow.com/questions/23844761/upstream-sent-too-big-header-while-reading-response-header-from-upstream for more info and a potential workaround.

    With my site, it was PHP deprecations that were being thrown by another plugin, and Query Monitor was catching those and sending them in the response headers so they could be displayed in the QM panel. There were just too many, even when I increased the buffer settings, I couldn’t get it to work, so I had to temporarily disable QM. I probably could have gone nuts with the buffer sizes, but the real fix is to see if you can resolve any PHP warnings/notices being thrown by your plugins (or theme).

    Thread Starter Ian Scott

    (@ianhughscott)

    Hello @nosilver4u – thank you so much for the reply and explanation. I truly appreciate it. My apologies for the length of time it took to thank you and reply back – have been swamped here!

    nosilver4u

    (@nosilver4u)

    You’re very welcome, I’m glad I stumbled across your post shortly after seeing the same error on my site a few weeks ago!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘502 Gateway Error When Updating WC Order Status’ is closed to new replies.