I didn’t want to write this here as I know that there are a few people who read my blog and who wish me ill, but I’ve been fighting with alcedea.net for the past month because of random slowdowns and crashes.
I won’t pretend I know what I’m doing. I’m “okay” with Linux, but the sad truth is that my entire network experience was with Windows NT-flavoured servers. I definitely don’t regret getting a VPS (Virtual Private Server), but with that comes the fact that I’ll get zero support from my host unless it’s hardware-related.
I have:
- Watched the processes on my server for HOURS on end (hint: it’s boring)
- Spent hours learning how to harden a VPS like my own
- Changed the SSH port and blocked port 22
- Disabled root login
- Blocked a whole range of IPs of known spammers
- Updated PHP and MySQL, twice
- Reconfigured httpd.conf
- Enabled logging of slow queries
And now I just found out that my MySQL config file was badly configured out of the box.
This is what it was in terms of server config (logs and variables were correct):
[mysqld]
query-cache-type = 1
query-cache-size = 8M
Um. It really should look like this:
[mysqld]
max_connections = 300
key_buffer = 32M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 4000
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 7000
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 2M
query_cache_size = 12M
query_cache_type = 1
tmp_table_size = 16M
The values are irrelevant; it’s what hasn’t been defined.
Let’s see how this goes… I’m really sick of fighting with this, and I haven’t been able to relax in a long, LONG time…
Current Mood:
Drained

Comments