Michael_D
asked on
MySql - Lost Connection to mySql during query
Hi,
I am supporting an application written in VB.net with MySql 5.0 as a backend
Recently the application started to give error messages stating "Lost Connection to MySQL server during query"
This error can popup every then and now during any query, regardless of the anything - just random....
I have changed timeouts, packetsizes - In short tried any suggestions that I could find on the MySql web site and other web resources
I have strong feeling that this is networking issue but I have no experience in troubleshooting such issues so I am lost at this point and need your help.
Any suggestions on what could be done?
Please note that this is production database and I am very limited in what I can do with it (at least I will need some good reasons to restart mySql or such things)
Please help!!!
I am supporting an application written in VB.net with MySql 5.0 as a backend
Recently the application started to give error messages stating "Lost Connection to MySQL server during query"
This error can popup every then and now during any query, regardless of the anything - just random....
I have changed timeouts, packetsizes - In short tried any suggestions that I could find on the MySql web site and other web resources
I have strong feeling that this is networking issue but I have no experience in troubleshooting such issues so I am lost at this point and need your help.
Any suggestions on what could be done?
Please note that this is production database and I am very limited in what I can do with it (at least I will need some good reasons to restart mySql or such things)
Please help!!!
I find Wireshark invaluable for troubleshooting Network issues, especially for apps that maintain an open connection to a server. Monitor any traffic on port 3306, look for large amounts of retransmissions or RST packets.
http://www.wireshark.org/
http://www.wireshark.org/
ASKER
The problem is that it could be ANY query.
users get sometime this error when providing username and password to login to system.
select command looks like Select * from employee where empCode='bla-bla'
employee table have about 200 records with index on empCode
Also I noticed that this error most probably will appear after long idle time.
I am getting this errors even when I am working with database tools like Toad for MySql or SQLyog
let say I run a query that returns a result almost immediately. then I do something else for couple of minutes and refresh my query sometime the error to show up - there is no way to reproduce this - it just happens randomly. I realize that nothing can happen just "randomly" that why I am looking for a way to find what causing this.
As the production server - we do have another server for testing and development but the error never happens when I am connecting to that one - just on production server.
users get sometime this error when providing username and password to login to system.
select command looks like Select * from employee where empCode='bla-bla'
employee table have about 200 records with index on empCode
Also I noticed that this error most probably will appear after long idle time.
I am getting this errors even when I am working with database tools like Toad for MySql or SQLyog
let say I run a query that returns a result almost immediately. then I do something else for couple of minutes and refresh my query sometime the error to show up - there is no way to reproduce this - it just happens randomly. I realize that nothing can happen just "randomly" that why I am looking for a way to find what causing this.
As the production server - we do have another server for testing and development but the error never happens when I am connecting to that one - just on production server.
ASKER
>>> oobayly
Can you tell me how to configure the Wireshark so i can use the captured info? I am a software developer not a network administrator and have very limited knowledge of networks protocols. And my client is small family business and he cannot afford to hire a network professional to investigate this issue. But he paid for software and expect it work so it is kind of my responsibility to find and eliminate any issues...
Can you tell me how to configure the Wireshark so i can use the captured info? I am a software developer not a network administrator and have very limited knowledge of networks protocols. And my client is small family business and he cannot afford to hire a network professional to investigate this issue. But he paid for software and expect it work so it is kind of my responsibility to find and eliminate any issues...
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I have increased wait_timeout and seems like the amount of the lost connections decreased.
I am going to accept oobayly's suggestion to use WireShark as a tool to troubleshoot the issue. At least I have found that there is no abnormal packages traveling through network
I am going to accept oobayly's suggestion to use WireShark as a tool to troubleshoot the issue. At least I have found that there is no abnormal packages traveling through network
ASKER
Thank you!
What the select command look like?
As your database is in production, you could install one mysql server on your pc very easily to make tour test. a dump and restore will be enough to restore data on your pc and the to run your tests without any streess ;)