GoelBiju / Visualising-Optimisation-Data

COMP3000 Final Year Project - Visualising Optimisation Data
0 stars 0 forks source link

Backend running out of memory #18

Closed GoelBiju closed 3 years ago

GoelBiju commented 3 years ago

Description:

The backend might crash locally or on Heroku when receiving a large volume of data through websockets to update into the database. This seems to be due to memory allocation/it runs out of memory?

Simply sending data one by one is no longer appropriate, there needs to be an alternate approach to send in data.

Acceptance criteria:

GoelBiju commented 3 years ago

Looking into this further, it is specifically the node.exe process which consumes all the computers memory and as a result crashes with JavaScript heap unable to allocate memory:

image

GoelBiju commented 3 years ago

With the fix in #22, the Heroku server has not yet crashed when sending all the data. Although it does take some time (approx. 13 minutes with database on MongoDB Atlas). The time it takes is a drawback and the fact that the client at the moment does not say when the operation has been complete without manually checking the data in the database needs to be addressed.