Hi everyone - here’s my top-level situation:
I’m running a small portfolio website and blog, with daily traffic in the low dozens. I use Ghost [4.32.0] on a Digital Ocean Droplet (Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-99-generic x86_64))
I have two external issues:
“Service was unreachable. Retry”
Now, when I go into my Digital Ocean graphs, I see that my memory usage is running persistently at over 80% - sometimes up to 85%. It never drops below 78% This doesn’t seem right for a small website serving such low traffic.
Digging deeper, running <code>top</code> I find that MySql is using the bulk of the memory.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
759 mysql 20 0 1343800 466616 18904 S 0.7 46.6 1:52.67 mysqld
When I run <code>service mysql status</code> I get the following report:
● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-02-14 16:47:25 UTC; 21h ago Main PID: 759 (mysqld) Status: “Server is operational” Tasks: 47 (limit: 1131) Memory: 463.5M CGroup: /system.slice/mysql.service └─759 /usr/sbin/mysqld
I have tried <code>service mysql restart</code> and it makes no difference. I have also tried to switch off my droplet and then switch it on and it makes no difference.
I also ran mysqlTuner and it flags the following:
[!!] Maximum reached memory usage: 834.8M (85.45% of installed RAM) [!!] Maximum possible memory usage: 9.9G (1036.23% of installed RAM) [!!] Overall possible memory usage with other process exceeded memory [!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance [!!] Ratio InnoDB log file size / InnoDB Buffer pool size (75 %): 48.0M * 2/128.0M should be equal to 25% General recommendations: MySQL was started within the last 24 hours - recommendations may be inaccurate Reduce your overall MySQL memory footprint for system stability Dedicate this server to your database for highest performance. Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1 Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: https://bit.ly/2TcGgtU Variables to adjust: *** MySQL’s maximum memory usage is dangerously high *** *** Add RAM before increasing MySQL buffer variables *** innodb_log_file_size should be (=16M) if possible, so InnoDB total log files size equals to 25% of buffer pool size.
The only other thing I can think to try is to update my version of Ghost - but there’s not enough memory to carry out the upgrade! I am reluctant to buy more memory - simply because a website this small with such low traffic shouldn’t need it.
So my questions: is there anything that could be causing my small, lightly used database to be churning so much memory? Is there an obvious solution beyond deleting the droplet and starting from scratch?
I hope I’ve provided enough information - I am a newbie so I might have missed something obvious. Any guidance would be much appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.