Server shuts down now regularly (mysql settings problem)

I have a number of Wordpress websites on my Linode (2GB RAM). Unfortunately my server crashes every now and then. I'am keeping an eye on it with Longview, but it doesn't look too bad here concerning too much memory. I have tried to adjust the mysql settings with Mysqltuner but without result. The mysqltuner returns:

Mysql's maximum memory usage is dangerously high
Add RAM before increasing MYSQL buffers variables
tmp_table_size (>32M)
max_heap_table_size (>32M)
key_buffer_size (~9M)

First I add RAM and tried to edit MYSQL variables but without result.
I'm quite an newby in this. Can someone watch with me? I put the screenshots of longview in the links below.

The mysql settings in my.cf file are:

skip-name-resolve=1
tmp_table_size = 32M
max_heap_table_size = 32M
table_definition_cache = 700
performance_schema=ON
key_buffer_size = 50M
innodb_buffer_pool_size = 210M
innodb_log_file_size = 64M
table_open_cache = 2500

https://ibb.co/wWk0hhY
https://ibb.co/sgST2g8
https://ibb.co/FgDvgVG
https://ibb.co/pvMtGC5
https://ibb.co/gySntxD

3 Replies

What OS are you running? How did you install MySQL? What configurations did you change, if any? What version of MySQL is it? (MySQL usually runs just fine out of the box. It is when people tinker with it that problems occur.)

You running Apache or NginX? (I only know Apache which has always been stable.)

What plugins are you using in WordPress (which is my best guess on why you are having issues.)

When you say the server 'crashed' do you mean it just stops running? How are you restarting it?

[editorial]
People, if you want help in this forum from the more experienced members you have to give us ALL the information about your system and application in order for us to determine what the issues might be. Otherwise most of us just don't bother.
[/editorial]

-Debian 11
-Apache
-installed "LAMP" stack

Maybe I was not totally clear but my best guess is that the problem occured after I changed the MySQL variables in my.cf. I'm wondering now what are the best mysql settings for 2 GB RAM Linode.

If you have a number of Wordpress sites on a 2GB plan and the MySQL tuner prints out

Mysql's maximum memory usage is dangerously high

My first thought is that you should upgrade your plan to a larger size. A 4GB plan will double your memory as well as increase the other resources available to you.

A lot of those screen shots you sent over were from "The Last 30 Minutes". I'm wondering what they look like if you increase the timeframe to look a bit further back to show when your server actually crashed.

Additionally, I suggest checking your server's log files. Error logs for MySQL are not enabled by default so you'll need to enable them manually but it's worth it since you'll get a bit more info on what may be causing the service to crash.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct