[ad_1]
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://projectdmc.org/support/topic/502-bad-gateway-36/ .
