Server exhausts all memory and crashes when certain pages are opened

I have a NC 24.0.4 installation on an Odroid HC2, inside Docker, using the Apache image. What I noticed is that opening certain pages in a single browser makes my whole box to kneel and reboot within seconds.

What I could determine was that those pages initiate a ton of requests simultaneously (separate requests for all the displayed elements at once), which drives RAM usage of the NC container to skyrocket, exhaust any physical memory quickly, and then the server kernel panicks.

The pages I observed this behavior are the Trash bin view, which, if I scroll down fast, keeps loading new pages of deleted files, and initites requests for each displayed file’s thumbnails without any throttling; and also the Maps app, when showing photos is enabled, and there’s a lot of photos to be put on the map.

First of all, I wonder if this is normal behaviour, to let a single page initiate requests by the dozens or hundreds, simultaneously? This seems like a good recipe for a quick DOS. Shouldn’t pages like these apply some throttling on the browser side?

Also, what would be the best practice to fine tune both my NC container and the MySQL DB? Maybe I should use a different image? Should I set different limits for my containers? Perhaps tune thee DB in some way? Is there maybe any kind of server-side queuing/throttling solution that could prevent such overloads?

Any input appreciated.

1 Like