Running out of memory after a day or two

Ok, I might have found the root cause for my Low Memory issues.

I was reading the scripts that install/setup the components for MiaB, and found that when setup.sh runs, it calls some other separate scripts that install required components, separately.

The script that installs the web portion (including adding the settings for php) is called “web.sh”.
Inside the web.sh there are instructions to add configuration parameters to www.conf, some of them are dependent on how much RAM the machine has.

Machines with less than 1GB gets assigned some settings, between 1GB and 2GB another set of settings, more than 2GB and less than 3GB another set, and anything with more than 3GB a more ‘demanding’ set of settings.

I originally created my VM as T2.Medium, which has 4GB of RAM, I ran the installation and setup, and when everything was working, I resized the VM to T2.Micro, which has 1GB of RAM.
MiaB doesn’t have mechanisms to reconfigure those parameters if the amount of RAM changes, so when I went from 4GB to 1GB of RAM, MiaB failed because it was basically configured to grab a lot more resources than the machine had.

I imagine that the same would have happened if I’d created the machine with 1GB of RAM and later upgraded it, php would be running with a set of parameters not optimized for the increase of RAM.

I haven’t read all scripts completely, but there is a chance that future updates don’t actually overwrite those settings, so if someone runs into this issue and changes them manually, maybe future upgrades will respect the manual changes. Im not sure about that but I will find out when I go over all the scripts.

4 Likes

Great work debugging the issue!

2 Likes

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.