Node to import data after a certain time

0

I'm importing data from an API with Node. Implemented everything with async and await and fetch to return the data and iteration with for of.

I use pm2 to run the server remembering that it's all local.

So far so good it imports up to about 1 million records and inserts in the database with native Mongo without mongoose.

But stop importing from nothing and at different points or sometimes to import into the registry 954,000 or 1,200,000, in the end, does not follow a pattern and in the log of pm2 does not return any error, nor return of the API , simply stop importing.

I thought it would be timeout or block for requesting too much, but it does not make sense because it takes hours to import and nothing happens to these locks without errors http or the Node itself.

I even removed the proxy to see if it helped:

npm config delete proxy, npm config delete https-proxy

Has anyone ever had this with Node?

    
asked by anonymous 30.05.2018 / 13:33

0 answers