14-Nov-2022 22:09
Hi everyone
I have an application running successfully for almost couple of years. But suddenly I am getting the below error. The configuration files are untouched. After then only I tried updating the timeout parameters in config file from the ideas provided through blogs. but no luck. We have used NGINX mainly for reverse proxy, so i hope this is something that needs to be fixed from NGINX (May be IP Blocked. I'm not sure). I have also given below my config file for reference. Kindly guide me in resolving this issue.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 320;
server {
listen 443 ssl;
server_name www.xxxyyy.com;
ssl_certificate C:/nginx/keys/zzzzz.pem;
ssl_certificate_key C:/nginx/keys/yyyyy.key;
location / {
proxy_pass http://127.0.0.1:4446/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
15-Nov-2022 10:54
Hi @Ashuda,
502 Bad Gateway is a generic error. Probably you can learn more looking at the NGINX error log.
A couple of reasons could be:
Usually NGINX shows 502 when it has a problem connecting to the backend service. Try to start your troubleshooting in this direction.
KR
Daniel
17-Nov-2022 22:07
Hi @Daniel_Wolf
Thank you very much for the reply. In my first level of troubleshooting, I don't see any bugs or service getting failed from the back-end. Regarding the below mentioned points
I can check whether the service port is blocked from my end. But I have few questions.
18-Nov-2022 03:02
Since your config file says C:\nginx\, I guess you are running NGINX on a Windows box.
Just take a look at Task Manager to see what processes are there and how much CPU / memory is consumed.
Check that you can access the backend (http://127.0.0.1:4446) from the browser.
Check Windows firewall rules.