I have a React App which I am running using serve command from Jenkins pipeline. One thing to note here is that I configured my Jenkins jobs to run indefinitely for logs. Below screenshot show how my app is running.
Aforesaid setup is running on Ubuntu server and my React App stops once the per-process file descriptor hard limit of 4096 is exhausted.
After a lot of investigation, I found that index.html file is getting opened periodically and is not getting closed so File Descriptor count keeps increasing over time. Also, while using app I have observed that there is no increase in count of index.html files i.e. I think its not tied to direct app usage.
Sever Side events is also already implemented for notifications, and I didn't have this issue so not sure if this issue is related to SSE.
Lastly, this started happening since recent release where multiple dependencies were updated and I changed package manager from npm to yarn.
Please note :
- I am not looking for answers suggesting to increase file descriptor limit on Linux but figure out and resolve actual issue.
- This project is built using create-react-app.
- Node version is v14.21.1