Here is a fun way to watch all your RAM being gobbled up in real time. Before you visit the Files tab, in a terminal, run the following:
while true; do free -h; sleep 3s; echo; done
Let that command run for a while, and watch the far right column, called āavailableā. This lets you see how much RAM the server is idling at, before you place any demands on it.
Then visit the āFilesā tab in Nextcloud, and watch the āavailableā RAM decrease.
Here is the behaviour seen on my Nextcloud 16 install, running on a VPS with a mere 1GB of RAM, showing before, during, and after I load up āFilesā:
total used free shared buff/cache available
Mem: 987Mi 346Mi 106Mi 16Mi 534Mi 465Mi
Swap: 255Mi 60Mi 195Mi
total used free shared buff/cache available
Mem: 987Mi 346Mi 106Mi 16Mi 534Mi 465Mi
Swap: 255Mi 60Mi 195Mi
total used free shared buff/cache available
Mem: 987Mi 364Mi 82Mi 19Mi 540Mi 444Mi
Swap: 255Mi 60Mi 195Mi
total used free shared buff/cache available
Mem: 987Mi 373Mi 71Mi 19Mi 542Mi 435Mi
Swap: 255Mi 60Mi 195Mi
total used free shared buff/cache available
Mem: 987Mi 377Mi 64Mi 19Mi 544Mi 430Mi
Swap: 255Mi 60Mi 195Mi
total used free shared buff/cache available
Mem: 987Mi 387Mi 111Mi 22Mi 488Mi 419Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 387Mi 110Mi 22Mi 488Mi 418Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 387Mi 110Mi 22Mi 488Mi 418Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 387Mi 110Mi 22Mi 488Mi 418Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 373Mi 125Mi 22Mi 488Mi 433Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 356Mi 141Mi 22Mi 488Mi 449Mi
Swap: 255Mi 61Mi 194Mi
total used free shared buff/cache available
Mem: 987Mi 356Mi 142Mi 22Mi 488Mi 449Mi
Swap: 255Mi 61Mi 194Mi
Note: Press āCtrl + Cā to end this RAM monitoring.
Before opening āFilesā, the server still had 465MB RAM free. During showing Files, this dropped to 418MB temporarily. But then after about 10 seconds, the free RAM raised back up to 449MB (and I was still looking at āFilesā).
That āavailableā RAM must not slam down to zero, or else you very likely must reboot your Nextcloud server!!
Note: the little thumbnail previews shown for each file and folder icon can be very RAM-expensive to generate (especially the very first time)! You would do well to have only a few files in your top-level folder in āFilesā. Instead create folders, and store your files deeper inside those.