I have a really big issue with my digitalocean droplet can you help me please,
I have a nodeJS app and it's work with MySQL and I use Nginx + Ubuntu
but for no reason, I got 502 bad gateway
I have upgraded my droplet and after 3 days my app down again
but the really weird on my digitalocean platform the CPU % and Memory is good
and now I have upgraded my droplet to the last package
can you help me please
and when I execute this command sudo tail -30 /var/log/nginx/error.log
I got this error
[error] 989#989: *6611 connect() failed (111: Connection refused) while connecting to upstream, client:
and I want to note that my app it's already work well more than 1 year
this is the nginx code
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name domain.app;
location / {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_set_header HTTP_X_FORWARDED_FOR $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.app/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.app/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = domain.app) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name domain.app;
listen 80;
return 404; # managed by Certbot
}
Thank you for helping