Ever since I tried out the AI plugins (and later removed them again), my machine totally hangs during /admin/upgrade.
Not every time but approximately 80% of the time.
Usually my whole EC2 instance freezes and I have to do a hard reboot through the AWS EC2 web UI.
Today it hangs again. To my surprise it doesn’t freeze completely. When opening the root URL it now shows:
Oops
The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.
Detailed information about the error was logged, and an automatic notification generated. We’ll take a look at it.
No further action is necessary. However, if the error condition persists, you can provide additional detail, including steps to reproduce the error, by posting a discussion topic in the site’s feedback category.
I now will try to reboot it again and do the usual sudo ./launcher rebuild app stuff which fixed it until now. Fingers crossed it will do this today, again.
My question
Can anyone give me some hints on where I could take a look into log files or things like this to get at least an error message of why the hangs occur?
I’m using an AWS EC2 “t2.medium” with 2 vCPUs and 4 GiB RAM.
The HDD is 100 GiB with 60 GiB of free space.
If it helps, I can upgrade “t2.medium” to a larger instance type.
I’m just confused that this setup ran rock solid (for years) before my testing of the official AI plugin and only ever since after removing it these hangs occur during upgrade.
Another thing has changed: the version of the software you are upgrading to. It has become more memory-hungry lately. So I think it could be either one.
A temporary and reversible upgrade to an instance with more RAM is probably the easiest way to test if memory shortage is the problem, although it does cost a couple of reboots. The other way is to add swap, which is also reversible.
This is a bit off topic, but I really would like to understand. Why swap, that used 200 MB, helped when there was 2 GB free RAM?
(I understand that in the inch world SI-system can be confusing because it uses 10 scale, but why the heck Mi? I can kind of understand Gi if it is shorted from giga, but should mega then be Me?)
I think the original problem was probably a process getting killed because the machine was out of memory (beware the OOM killer). Adding swap meant that memory was not exhausted. Those two outputs of free may not be telling the whole story, unless they were very carefully taken at the moment of most machine stress. It’s the peak swap usage that’s interesting, I think.
Worth nothing that the memory overcommit has nothing much to do with Redis. It’s just that Redis is kind enough to hint that it should be set correctly.
So 4 GB is just on the edge at building time, if we suppose that last screenshot tells the most stressful moment.
And that is another thing I can’t understand: why others hit low memory and I, who uses a lot plugins and components, had zero issues what makes that difference?
And I used had because nowadays I have 8 GB because of AI (and for me the price difference was not so important, but that is another story).
Should this thread move somewhere else or are we seeing this as an explain why using swap helped?
Anyway. For other beginners this one example where is talked little bit about low memory and reasons for that:
That is strongly FAQ question when upgraiding fails. But reason for that is rarely explained.
Thanks @uwe_keim - I’m going to suppose that those kernel tunables are the reason you needed to add swap, even though it didn’t seem to be used. (The same would apply if you’d needed to add loads of RAM, because the total available memory is RAM+swap.)