PM2 with 502 Gateway error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, recently I have been using IIS as a reverse proxy to rewrite a node application URL. I am using PM2 as the manager to start the NodeJs program. However, I did notice that after some hours, when the user triggers the application again, it will always display the following message:
502 - Web server received an invalid response while acting as a gateway or proxy server.
Then, when the user refreshes, the application works again. I wonder if PM2 has any mechanism that sleeps after a period of time. Any advice or reference?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing PM2 process status and logs with the IIS reverse-proxy logs when the 502 occurs after several hours. Determine whether the Node.js application remains running and whether refreshing changes the response; done means identifying a reproducible PM2-related cause or documenting that the failure is in the IIS proxy configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100