• Resolved dineshravajani

    (@dineshravajani)


    When I go to User and click Switch to, I get a 502 Bad Gateway error message.

    When my website was on an Apache server, it worked fine. However, after transferring it to a new Nginx server, we started getting a 502 Bad Gateway error.

    I’ve already checked this similar support ticket https://www.ads-software.com/support/topic/unable-to-switch-user-error-502-bad-gateway/ but we didn’t get the actual issue.

    I’ve also checked error logs on the server but there is no any error related with user switching plugin.

    Could you please help me to fix this issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    There should be an error logged in either your Nginx logs or your PHP logs, probably an “upstream sent too big header” error. When this has come up in the past it’s always been due to a low limit for the maximum size of the HTTP headers in Nginx. This is controlled by the fastcgi_buffer_size or proxy_buffer_size directive in Nginx. When User Switching (usually combined with another plugin) sets additional cookies, it causes this low limit to be exceeded and triggers this error.

    There’s some more info in this thread: https://www.ads-software.com/support/topic/502-bad-gateway-36/ .

    Thread Starter dineshravajani

    (@dineshravajani)

    Hi,

    Thanks for all the help. I’ll try to increase the header size limit as mentioned.

    Once again, thanks for the quick assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.