LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2011, 12:09 AM   #1
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Rep: Reputation: Disabled
MySQL Server Linux, CentOS VPS - Lost connection to MySQL server during query


Hello,

I have setup a small MySQL server running on CentOS, Linux. It's running fine apart from I am getting "Lost connection to MySQL server during query" through the control panel that is connecting to it from another server.

I'm only using 75MB out of 512MB of RAM, just in case it matters. I have two servers connecting to the database, and they're both getting this error, the two servers are running on Windows Server 2008 and the MySQL VPS Server is running on Centos, Linux.

Below is the my.cnf
Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-innodb
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 360
max_allowed_packet = 126M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
query_cache_size = 32M
query_cache_type = 1

[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 126M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

[mysql.server]
user=mysql
 
Old 10-29-2011, 12:30 AM   #2
Toggan
Member
 
Registered: Oct 2011
Distribution: CentOS 5.9
Posts: 39

Rep: Reputation: 6
My suggestion would be to enable MySQL slow query logs and see if the remote page is timing out waiting for the query to return a result. You may also want to use the EXPLAIN command in the local MySQL instance to get more information about the query itself, that way, you can ensure it's as efficient as possible.
 
Old 10-29-2011, 01:18 AM   #3
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Toggan View Post
My suggestion would be to enable MySQL slow query logs and see if the remote page is timing out waiting for the query to return a result. You may also want to use the EXPLAIN command in the local MySQL instance to get more information about the query itself, that way, you can ensure it's as efficient as possible.
That's the hard part, it's TCAdmin so I didn't code it so I have no idea what's wrong, which is unfortunate. I'll demo that and then post back with the results, I have no clue what command it's actually sending to return that.
 
Old 10-29-2011, 04:01 AM   #4
snooze1
Member
 
Registered: Sep 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
Alright I added this to the my.cnf
Code:
log_slow_queries=/var/log/mysqld.slow.log
long_query_time=2
So far it hasn't logged anything, been running for just over two hours.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost connection to MySQL server during query when executing 'REPAIR TABLE ... '? Ujjain Linux - Server 3 03-20-2009 10:05 AM
Error: Lost connection to MySQL server during query the expert Linux - Newbie 6 09-04-2008 01:40 PM
Lost connection to MySQL server during query figure8car Mandriva 1 12-05-2004 05:28 PM
ERROR 2013: Lost connection to MySQL server during query kicap Linux - Software 0 11-23-2004 09:30 PM
Error: lost connection to MySQL server during query patpawlowski Programming 2 01-23-2004 08:56 AM


All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration