z0diac
02-28-2012, 12:43 PM
Can someone give me an example of their my.cnf file for a forum that can handle a lot of simultaneous connections?
I'm getting a lot of "cannot connect to mysql" errors.
My forum has a LOT of attached images: a typical post has 30-50, and there's 5 posts shown per page by default. So that's up to 250 thumbnails being generated per page view. This all worked fine when I ran the galleries as HTML, but since I've moved them all into the forum, I think it's displaying all these thumbnails that are creating a lot of connections to mysql.
My typical online count of users (last 15mins) is 200-300.
max connections right now = 500
My server (dedicated) has 4GB ram.
The top part of my current my.cnf is this:
max_connections=500
set-variable=local-infile=0
datadir=/var/lib/mysql
old_passwords=1
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 1025
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
I'm planning on moving a lot more of my former HTML site onto the forum so that will mean more connections needed, and just the current traffic is growing from month to month.
Does anyone know which of these settings I can safely boost?
ps. there are 2 other forums run on my server, but both are much lower in # of visitors (only ~50 online average for each one)
I'm getting a lot of "cannot connect to mysql" errors.
My forum has a LOT of attached images: a typical post has 30-50, and there's 5 posts shown per page by default. So that's up to 250 thumbnails being generated per page view. This all worked fine when I ran the galleries as HTML, but since I've moved them all into the forum, I think it's displaying all these thumbnails that are creating a lot of connections to mysql.
My typical online count of users (last 15mins) is 200-300.
max connections right now = 500
My server (dedicated) has 4GB ram.
The top part of my current my.cnf is this:
max_connections=500
set-variable=local-infile=0
datadir=/var/lib/mysql
old_passwords=1
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 1025
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
I'm planning on moving a lot more of my former HTML site onto the forum so that will mean more connections needed, and just the current traffic is growing from month to month.
Does anyone know which of these settings I can safely boost?
ps. there are 2 other forums run on my server, but both are much lower in # of visitors (only ~50 online average for each one)