My App is crash

Hello everyone, I have a question about performance, I have an app developed by meteor + vue and I deploy on DigitalOcean with Ram 4 and cpu 4, users on my app have Fifteen clients, some of them having to process data and some of them having to view reports on the sytem when they were working together at the same time, causing the system to crash, I checked my coding as if nothing was wrong. Anyone with the same problem as me, please share your experience.

Please help!

Hi @phanchanra
Without more context is hard to understand what’s happening.
Did it throw any errors? Do you have something like APM/Datadog to monitor the errors and profiling?
Do you make a lot of use of Pub/Sub?
Did you make any changes recently in your code?

I add picture on my question thank

Hi @phanchanra

  • What is the capacity of the database ( CPU, Mem, Network), I see a lot of database connection failures occurring, and also lack of memory in the application server.

  • Out of these 15 clients how many concurrent users access the application?

  • Also, from the prints, I saw that you use Monti APM, did you see if you have any slow query or any query in the database that is taking longer than usual?

  • About your meteor deployment, how did you implement it in the digital ocean? (Docker, MUP, others?)

I recommend using Galaxy for your apps because we have an infrastructure optimized for meteor apps, but if you want to host on your own I recommend implementing via MUP:

Best Regards,

Philippe Oliveira

Screen Shot 2022-07-25 at 6.37.17 PM

Yes, it looks like something from the database. I suggest validating the database logs and resources.

It can often be that the capacity (CPU,Mem)is too low.

Best Regards,

Philippe Oliveira

Javascript heap out of memory

Your instance ran out of available RAM.

Increase the ram in the instance to around 8gb (this is what I am using without issue and 100s of active users), and enable a swap it’s only a few lines to get going:

Make a 1gb swap and set perms:
sudo fallocate -l 1G /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
sudo chmod 600 /swapfile

Enable it:
sudo mkswap /swapfile
sudo swapon /swapfile

Check it all worked:
sudo swapon --show

Remember to add to the fstab so that it gets mounted on every boot e.g

/swapfile swap swap defaults 0 0