Score:5

AWS server completely shutting down because of the insufficient CPU memory (server-kernel: out-of-memory )

gt flag

WordPress website(4years old) have been recently migrated from shared server to the AWS server (2cpu, 4GB ram,80 SSD).After migration website was working fine but in the night between 2am and 6am the CPU is showing spike in the usage(only on Saturday or Sunday) which cause the CPU to run out of memory and shutting down the whole server and also mail servers. After restarting the server website is running properly and also there is no spike in the CPU usage(10% - 15%). Screen shot of the logs attached https://prnt.sc/LTyOU9YrEHd6. Error logs before the website is down Usage after the server restart

What may be causing the problems with the CPU usage?, Is it because of the spamd usage or SQL usage?

ws flag
Please DO NOT post images of text you can cut and paste here.
Score:6
ws flag

What may be causing the problems with the CPU usage

Bad configuration.

First you need to reduce the memory overcommit (the default heuristic is way too optimistic on server hosts). There is lots of documentation on the internet. But a lot of them talk about choom and oomadj - DO NOT try to use these to solve your problem.

Next you need to configure all the services to limit the amount of memory they use up. I can't tell you how to do that because you didn't tell us what they were (don't reply with a list here - go research each daemon and of you can't find the answers, post new questions).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.