Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a PHP script that queries a MySQL table and exports to .csv. Pretty basic stuff. About 1000 row table.

The problem I'm having is that sometimes it will work instantly (download the .csv), and sometimes it just times out and I get the "connection to server was reset."

Any ideas why sometimes it will work multiple times in a row then in a different session just timeout?

Thanks.

share|improve this question
1  
anything in logs? Notice how many times it works in a row before timing out, and is it consistent? Does it work again on its own or does it need a restart?... –  Bart Silverstrim May 29 '12 at 16:51
    
How loaded is the server? Are there many other connections to MySQL at the time? –  Richard Keller May 29 '12 at 16:53
    
@ Bart I haven't checked, but sometimes it works many times without a problem, so I thought it was fine, then I will go back a few hours later and it won't work. Then maybe the next day it will. I have changed between PHP 5.2 and 5.3 and back, so there may be a possibility of that delay causing a problem. I have also tried changing the connection character sets to resolve the issue (not sure how long it takes phpMyAdmin to change those. So, some days/times it works instantly or some days/times it won't work at all @ Richard How would I check the server load? –  Shawn May 29 '12 at 17:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.