evershopcommerce / evershop

🛍️ NodeJS E-commerce Platform
https://evershop.io/
GNU General Public License v3.0
4.49k stars 1.24k forks source link

[BUG] Evershop server stops responding every 5 minutes #657

Open dheeth opened 2 weeks ago

dheeth commented 2 weeks ago

Describe the bug My evershop server stops responding every 5 minutes and I am not able to debug the issue. I tried running the server in production with --debug but the pm2 logs still remains same. No extra informative or debug logs to understand what's causing this. I have checked CPU and memory spikes as well everything is normal.

Hitting pm2 reload or restart resolves the issue.

The only logs I see in nginx error logs is

2024/11/04 05:42:29 [error] 490617#490617: *60350 upstream timed out (110: Unknown error) while reading response header from upstream, client: 106.219.122.245, server: shopscape.co, request: "GET / HTTP/2.0", upstream: "http://[::1]:3000/", host: "shopscape.co"
2024/11/04 05:43:29 [error] 490617#490617: *60350 upstream timed out (110: Unknown error) while reading response header from upstream, client: 106.219.122.245, server: shopscape.co, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "shopscape.co"
2024/11/04 05:44:30 [error] 490617#490617: *60350 upstream timed out (110: Unknown error) while reading response header from upstream, client: 106.219.122.245, server: shopscape.co, request: "GET /favicon.ico HTTP/2.0", upstream: "http://[::1]:3000/favicon.ico", host: "shopscape.co", referrer: "https://shopscape.co/"

How do I debug this?

dheeth commented 2 weeks ago

Resolved, it was an issue with my nginx configuration, I had forced http2, some configuration issue was there from my side.

dheeth commented 2 weeks ago

I was mistaken, the server did run for 12 hours and when it stopped again I tried to curl on localhost and it didn't even respond on localhost at that time. It seems like some specific event or trigger takes down the evershop server. I am not able to debug this. pm2 reload/restart fixes the issue