I have a node.js process running continuously on a linux EC2 instance, it extracts data and stores it in mysql. Some reads are also performed on the database.
The process can run well during hours or days, and have a steady RAM consumption. But from time to time it starts to consume more and more RAM, keeps increasing up to 100% of it causing the server to become unresponsive.
I first thought of a memory leak, but haven't managed to find anything.
Then I had a look at the I/O (using htop's "Detailed CPU time option"), and saw that there is a lot of Iowait (CPU bar remains filled in gray) at the same time when the RAM usage of the node.js process is increasing.
Is it correct to interpret that there is a correlation between the 100% RAM consumption problem and the I/O perf issue? Or should I go back to my memory leak investigation?
update: I have launched the same code, processing the same volume of data on a server from a different cloud provider. I don't have any peak of memory usage so far. I'm considering to switch to that provider and forget about that. Still curious to know what the cause of the problem could be. hardware ? some configuration?