Hello,
my server has 4 Gb of RAM and is not overloaded. Sometimes some PHP scripts use more memory and I receive "out of memory" messages, but there is no out of memory... and it kills MySQL, what is a big problem.
How to fix this?
----------
Out of memory:
The process “mysqld” was terminated because the system is low on memory.
In order to avoid a system crash due to low memory, the kernel terminated the process named “mysqld” with the PID “1311”.
(...)
Process OOM Score 66
Status Out of Memory
Memory Information
Used 602 MB
Available 3.11 GB
Installed 3.7 GB
[308508.568672] [12514] 1005 12514 63883 11265 124 566 0 php-cgi
[308508.572096] [12516] 1005 12516 63883 11018 123 813 0 php-cgi
[308508.575429] [12517] 1005 12517 63883 11345 123 488 0 php-cgi
[308508.578967] [12518] 1005 12518 64331 12033 126 302 0 php-cgi
[308508.582312] [12522] 1005 12522 64014 11704 127 301 0 php-cgi
[308508.585508] [12533] 1005 12533 57622 5442 109 120 0 php-cgi
[308508.589325] [12557] 1002 12557 55306 3297 107 13 0 php-cgi
[308508.594133] [12558] 1002 12558 54101 1978 105 17 0 php-cgi
[308508.597030] Out of memory: Kill process 1311 (mysqld) score 66 or sacrifice child
[308508.599799] Killed process 1311 (mysqld) total-vm:1803856kB, anon-rss:206380kB, file-rss:0kB, shmem-rss:0kB
my server has 4 Gb of RAM and is not overloaded. Sometimes some PHP scripts use more memory and I receive "out of memory" messages, but there is no out of memory... and it kills MySQL, what is a big problem.
How to fix this?
----------
Out of memory:

In order to avoid a system crash due to low memory, the kernel terminated the process named “mysqld” with the PID “1311”.
(...)
Process OOM Score 66
Status Out of Memory

Memory Information
Used 602 MB
Available 3.11 GB
Installed 3.7 GB
[308508.568672] [12514] 1005 12514 63883 11265 124 566 0 php-cgi
[308508.572096] [12516] 1005 12516 63883 11018 123 813 0 php-cgi
[308508.575429] [12517] 1005 12517 63883 11345 123 488 0 php-cgi
[308508.578967] [12518] 1005 12518 64331 12033 126 302 0 php-cgi
[308508.582312] [12522] 1005 12522 64014 11704 127 301 0 php-cgi
[308508.585508] [12533] 1005 12533 57622 5442 109 120 0 php-cgi
[308508.589325] [12557] 1002 12557 55306 3297 107 13 0 php-cgi
[308508.594133] [12558] 1002 12558 54101 1978 105 17 0 php-cgi
[308508.597030] Out of memory: Kill process 1311 (mysqld) score 66 or sacrifice child
[308508.599799] Killed process 1311 (mysqld) total-vm:1803856kB, anon-rss:206380kB, file-rss:0kB, shmem-rss:0kB