PDA

View Full Version : Invalid SQL problem


vexxy
11-02-2011, 11:40 AM
I've recently started to get this invalid SQL issues:

Invalid SQL:

SELECT *
FROM style
WHERE (styleid = 2 AND userselect = 1)
OR styleid = 2
ORDER BY styleid ASC
LIMIT 1;

And the MYSQL goes away, error 2006. It's not a particular script that does that, i've seen reports on attachments, on ajax.php etc. Can anyone tell me what's this error about and how can i fix it? I run on VB 4.1.7 and a dedicated box.

MY.CNF file:

max_connections=500
safe-show-database
connect_timeout=15
interactive_timeout=100
join_buffer=1M
key_buffer=768M
max_allowed_packet=32M
max_connect_errors=20
myisam_sort_buffer_size=128M
read_buffer_size=12M
read_rnd_buffer_size=12M
sort_buffer_size=12M
table_cache=1024
thread_cache_size=128
thread_concurrency=8
wait_timeout=60
query_cache_size=256M
query_cache_limit=8M
query_cache_type=1
skip-innodb


i've also raised the wait_timout to 120, no success..same problems appear

Lynne
11-02-2011, 03:42 PM
When you change a mysql config value, you need to restart mysql - did you do that? You may have to make the wait_timeout larger. George suggests upping it by about 60 each time until you find the right value for your site. I think I have my site set at 500 and it seems to be about right for us.

vexxy
11-02-2011, 04:30 PM
yep I did restart it after each change :) as for that setting, your prolly have also a busy forum. The forum I have this problem is at its beginnings and max 10 users are posting within the forums. Also the traffic per day is max 500 uniques. Isn't it normal for vb to work under very light load with 120 timeout? Also, where's the invalid sql coming from? is there a script something i messed up and i need to repair it?