NodeJs Developer for fixing major bug

Job ID: 36330903

Budget: $30 – $250 USD

Hello,

My name is Sebastien and I am encountering a major bug on my web app. This is urgent.

I have a NodeJs application built with the express framework. It's been 2 weeks since I started filling the database with data from different APIs.

The usual functions basically request data from the API (which usually returns an array of objects), and then it iterates through each object and update the database with some informations.

Also there is some functions that do the following:

- Gets all the data from my database.

- For each row it makes a get request to an API.

- Updates the database with the new data returned by the API call.

I also had 3 cron jobs scheduled to run every 6 hours that gets data from the API, and updates the database.

Everything was working like a charm, till 4 days ago when I was working on a new function that basically does the same job as the others and I got the following error `FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory`.

I don't encounter this error only on this specific function, but also on the other functions which they used to work fine with no errors at all. (Like the ones I scheduled for the cron jobs).

Please note that since this bug, I have a very high usage of my server RAM without reason.

Thank you.
Related categories: JavaScript MySQL Node.js Web Hosting API