I'm a bit confused about which settings to change in my my.conf file to optimise for my server (the mysql server keeps crashing due to our high traffic).
Here's the my.cnf file:
[mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking key_buffer = 16M max_allowed_packet = 16M myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 query_cache_limit = 1M query_cache_size = 16M
And the server specs are:
CPU Cores 2 cores RAM (Memory) 1GB SSD (Disk Space) 20GB
Running Ubuntu 12.04 LTS
Here are my partitions:
NAME FSTYPE SIZE MOUNTPOINT LABEL vda 20G ├─vda1 ext4 476M /boot ├─vda2 swap 477M [SWAP] └─vda3 ext4 19.1G /
Any help would be much appreciated.
Looking at the error logs, I can see that mysqld was out of memory:
Feb 17 11:02:06 111488 kernel: [8276839.559141] Out of memory: Kill process 20719 (mysqld) score 75 or sacrifice child Feb 17 11:02:06 111488 kernel: [8276839.559209] Killed process 20719 (mysqld) total-vm:1347424kB, anon-rss:30524kB, file-rss:0kB