Slow NGINX Reverse Proxy
A couple of things that I noticed in your config file are that proxy_cache_bypass $http_upgrade
seems weird (but you don't seem to have proxy caching enabled in the first place so that shouldn't matter), and that your upstream seems to be on the same host as your nginx but you're using the public IP rather than localhost. If you change the proxy_pass IP to 127.0.0.1 instead, does that make any difference?
As a sanity check, what's the performance of skipping nginx and hitting the backend directly (either from your local machine or SSHed into that box), and of serving a static file directly from nginx (a 404 page works)? If there's a problem with the proxying specifically, the proxy request would be quite a bit longer than the sum of those two.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now