Support » Plugin: User Switching » 502 Bad Gateway

  • Resolved André B.



    i´ve got a 502 error when I try to switch users. setup is NGiNX and PHP 7.2. Is there any known issues with this setup?

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


    WordPress Core Developer

    This might be caused by a low header size limit in nginx. Can you clear your cookies for the domain and try switching again please?

    If the error goes away then this probably means the header size limit in nginx was reached and User Switching just happened to be the plugin which pushed the header size over the limit when it tried to set its cookies. You can increase the limit, I’m not sure of the config directive off the top of my head.

    Let me know.

    It is likely to be an issue with the server limitations as mentioned by John. The error 502 can occur for a number of reasons. It would be an easy fix, if you post the server log (removing any private details in it).

    Probably, you may have to increase fastcgi_buffer_size as explained at .

    Thread Starter André B.



    Thanks for all help. I´ve solved it by looking into header size limits as mentioned, both for proxy and fastcgi.

    Once again, thanks for quick help.

    This worked for me setting additional nginx directives:
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;

    CentOS Linux 7.4.1708 (Core)‬
    Plesk Onyx Version 17.5.3
    PHP 7.0.25
    FPM application served by Apache

    Also Google: nginx upstream sent too big header while reading response header from upstream

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘502 Bad Gateway’ is closed to new replies.