Hi,
Could anyone give me some clue on how to troubleshooting such an issue. Here is my problem.
I'm setting up nginx as the reverse proxy for a new nodejs app. But when testing it, only 50% ~ 60% requests are passed to the nodejs app, other requests simple fail as a result of upstream timed out. The failure occurs even in a consistent way. The 1st request is successful, the 2nd request times out, then success, then timeout...
I even tried with a trivial expressjs app, which only respond to a GET request and send an empty response body. It fails in the same way. In the meantime, I'm use the same nginx instance to reverse proxy a Java app, it works well, no failure at all.
What I found is nginx didn't pass the requests to node in 50% of the time, it was just hanging there until timeout.
What should I check? What nginx or network setting may lead to such behavior? Thanks in advance!
My Env:
CentOS 8
nginx 1.14.1
nginx and the apps are on the same virtual machine
Could anyone give me some clue on how to troubleshooting such an issue. Here is my problem.
I'm setting up nginx as the reverse proxy for a new nodejs app. But when testing it, only 50% ~ 60% requests are passed to the nodejs app, other requests simple fail as a result of upstream timed out. The failure occurs even in a consistent way. The 1st request is successful, the 2nd request times out, then success, then timeout...
I even tried with a trivial expressjs app, which only respond to a GET request and send an empty response body. It fails in the same way. In the meantime, I'm use the same nginx instance to reverse proxy a Java app, it works well, no failure at all.
What I found is nginx didn't pass the requests to node in 50% of the time, it was just hanging there until timeout.
What should I check? What nginx or network setting may lead to such behavior? Thanks in advance!
My Env:
CentOS 8
nginx 1.14.1
nginx and the apps are on the same virtual machine