I have a Linux Ubuntu virtual server at Digital Ocean with the following specs: 1 vCPU, 2GB of memory, and 25GB of SSD storage.
The server is running a single WordPress website with around 400 unique visitors per day. A caching plugin has been installed and configured. Redis is also installed and configured on the server.
I have setup a memory usage notice in the control panel of Digital Ocean and I am being notified multiples times a day that the server has crossed the 70% threshold for usage.
When I run htop in the terminal, MEM is being shown as using 1.2GB to 1.4GB of 1.92GB at any given moment. SWAP is shown to be using 39.2MB of 2.00GB.
When I view the peak memory usage in the Query Monitor plugin installed in WordPress, it shows only 3.2% of 768 MB server limit being used. I have defined the PHP memory limit to be 768MB in the WordPress configuration file. These numbers seem to run in contrast to what the server is telling me related to memory usage on the server.
In my server's my.cnf, I have the following parameters set:
- performance_schema = off
- innodb_buffer_pool_size = 512M
- key_buffer_size = 64M
- max_connections = 400
Can anyone suggest where the memory hogging me be taking place on the server?