hpi-sam / digital-fuesim-manv

A German simulation system for training emergency medical services leadership personnel on how to manage Mass Casualty Incidents.
https://fuesim-manv.de/
GNU Affero General Public License v3.0
16 stars 8 forks source link

Importing an exercise takes up large amounts of memory #542

Open ClFeSc opened 2 years ago

ClFeSc commented 2 years ago

When importing an exercise to the database a huge amount of memory is taken up (at least on my laptop) until Node goes out of memory and crashes. It should be investigated

  1. whether this occurs repeatedly on different machines, and
  2. whether this is due to an incorrect/inefficient implementation or whether it's a direct result of the large exercise.
anonym-HPI commented 2 years ago

With database disabled also a timeout (local development, so can't be nginx timeouts) can happen and showing the big red warning message, but the upload after a while finishes and it is possible to enter the exercise.

Greenscreen23 commented 2 years ago

What dataset did you use to test this? The ones from digital-fuesim-manv_test-scenarios or a different exercise?

ClFeSc commented 2 years ago

I think it was the Ahrweiler scenario which should be included in the mentioned repo.

anonym-HPI commented 2 years ago

I think it was the Ahrweiler scenario which should be included in the mentioned repo.

Yes should be Ahrweiler (BABZ großes Szenario), don't know if the one I tested is identical with the one in the test repo, but was (as far as I know) from the same exercise.

Greenscreen23 commented 2 years ago

Btw, I wanted to verify this on my setup, and the docker containers index page doesn't look like the current page. It is missing the import button f.e. :D I still have some issues building the container because npm run deployment is timing out in the hpi wifi, even after increasing the timeout. I'll try to build the container at home and verify this later.

anonym-HPI commented 2 years ago

Btw, I wanted to verify this on my setup, and the docker containers index page doesn't look like the current page. It is missing the import button f.e. :D I still have some issues building the container because npm run deployment is timing out in the hpi wifi, even after increasing the timeout. I'll try to build the container at home and verify this later.

(Mind what I described happened locally without using docker and with database disabled - but what I described is another problem, as without database).

Missing the import button, do you mean the public image on hub.docker.com?

Greenscreen23 commented 2 years ago

I wanted to test it with and without the database, as both cases were mentioned above. The image I used was digitalfuesimmanv/dfm:latest

anonym-HPI commented 2 years ago

I wanted to test it with and without the database, as both cases were mentioned above. The image I used was digitalfuesimmanv/dfm:latest

Did you test it locally without database and without docker?

Greenscreen23 commented 2 years ago

Jup, that works just fine. No signs of node crashing or consuming too much memory I was using the "normal" angular dev server.

Greenscreen23 commented 2 years ago

I've just managed to build the docker container, and I can't reproduce the issue mentioned. I can import and join all three scenarios both with and without a database using docker.

Are you guys still able to reproduce the issue on the latest commit of dev? Maybe this has been fixed somehow.

ClFeSc commented 2 years ago

I can retest it on my setups. Btw. you know that the latest tag on hub.docker.com is about half a year old, as no one has pushed to main since then? So it's expected to be outdated.

Greenscreen23 commented 2 years ago

We could do a meeting for this if want. I'll message you in a private chat for this :)