• Hi There,

    We are facing issue with Switch To on our website since we updated to WP 5.2.2.
    The plugin was working perfectly fine before that. We are using Sucuri’s web firewall. All the requests go through them.

    When we looked at the server ssl-error logs this is the issue we found:-
    2019/07/29 16:46:15 [error] 17179#17179: *9019508 upstream sent too big header while reading response header from upstream, client: xx.xxx.xx.xx, server: ourdomain.xxx, request: “GET /wp-admin/?action=switch_to_user&user_id=12345678&nr=1&_wpnonce=1feasadase8d0 HTTP/1.1”, upstream: “fastcgi://127.0.0.1:8000”, host: “ourdomain.xxx”

    Upon more research, we found a few links in which people asked to update the nginx directives. Here are the updated values for additional nginx directives:-

    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    proxy_busy_buffers_size 256k;

    Here is our server information:-
    Server architecture – Linux 4.4.0-87-generic x86_64
    Web server – nginx/1.10.0
    PHP version – 7.0.18-0ubuntu0.16.04.1 (Supports 64bit values)
    PHP SAPI – fpm-fcgi
    WP Version – 5.2.2
    Is this site using HTTPS? – Yes

    Please assist us in resolving this issue.

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

    (@johnbillion)

    WordPress Core Developer

    Sorry you’re having problems!

    This isn’t an issue specific to User Switching as it can be caused by any plugin or theme that sets extra cookies or request headers.

    Make sure you’ve restarted Nginx safer changing your config. If that doesn’t help, your best bet is to contact your host to ask for help.

    Thread Starter manmohans03

    (@manmohans03)

    Hi John,

    Thanks for your reply.

    We will get the Nginx server restarted again.

    The thing is that, this issue(upstream sent too big header) only happens when we use Switch To. According to our server team, none of the server configuration has changed in past few months.

    Is the a way to test that these additional nginx directives are updated properly on the production server?

    It will be great if you can point in the right direction to resolve this.

    cbrady23

    (@cbrady23)

    Yeah, same issue here. This plugin used to work on my server but now it is broken.

    Hi,

    for anyone still strugglign with this issue i was able to fix it on my server by adding the following

    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;

    into my site conf

    it seems to be the buffer sizes that cause the upstream to large issue

    answer from stackoverflow if you want more info

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘502 bad gateway error / Nginx’ is closed to new replies.