• Resolved loafintree

    (@loafintree)


    We have a multisite setup with the latest version of WP. When I go to switch, it gives me a 404 page and user is not switched. The console gives me a 502 and the headers include wordpress_test_cookie which is not the same header I see on a successful switch. The nginx log gives a “upstream sent too big header while reading response header from upstream”. I have increased the proxy buffer settings which should be more than enough. I have deactivated all plugins and switched to twentyseventeen theme. I’ve changed salts and even created another super admin. No success. The only thing I can think of to suddenly cause this was a update of MySQL to 5.7 on our db server, however, I didn’t run into any errors during that process and the databases seemed to update fine. I have no problems on any other sites I manage. I manage around 80 WP sites with 1000’s of users and this is the first problem I’ve ever had with this plugin. It’s been on my default plugin list for some time and very useful! Any ideas?

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

    (@johnbillion)

    WordPress Core Developer

    This is a problem that crops up now and then. The problem isn’t inherently caused by User Switching, but rather anything that adds additional headers or cookies to the response can tip it over the maximum header size that Nginx allows.

    There’s more than one Nginx config directive that you need to change. Check out the thread here for more info: https://www.ads-software.com/support/topic/502-bad-gateway-36/

    Hope that helps.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Oh, you may want to clear your browser cookies for the domain, too. You might have a load of stale cookies in there.

    Thread Starter loafintree

    (@loafintree)

    Clearing browser history/cookies and changing proxy_buffer_size to 512k did not solve the problem. Problem fixed by adding these lines to included nginx .conf file:

    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;

    Culprit seemed to be wordpress_logged_in cookie at 187k. Not sure why it’s so large. Thanks for the quick response.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    187k?! Wow something’s going wrong there. Might want to try deactivating some other plugins to try to find the culprit.

    Glad you got the immediate issue fixed though.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WIll not switch 404’ is closed to new replies.