Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an error whenever I run my code for a certain time. I use a lot of loops and sql connections. I basically, put and take out links from my database.

The problem is that there is some error thrown that I cant see, whenever I execute a long sql operation ..

Note that the fault isnt the code. The code runs well, whenever there are a few links involved. But when there are over 200 links.. an error is thrown that I cants see.

I tried to trace the error in a few places:

C:\Program Files\Zend\ZendServer\logs\php_error.log
C:\Program Files\Zend\phpMyAdmin\
Edit Viewer in win xp

I am running XP: Windows xp php version: 5.3.9-ZS5.6.0. Apache/2.2.21 Apacher version: (Win32) mod_ssl/2.2.21 OpenSSL/0.9.8o

I cant trace the error at all, and why it happens. All I can suspect of, is that there is a server timeout..

share|improve this question
up vote 2 down vote accepted

the fault isnt the code

Yes it is. If you suspect that it's a timeout issue.

It should be trivial to check the webserver access log to see if the request duration is in the region of the timeout limit configured for apache, or the max_execution time configured for PHP. Regardless, you should be able to see what's happenning in the webserver error log.

Do check your PHP instalation (you don't say how apache connects to PHP) is configured to log errors.

share|improve this answer
I am clueless on how to connect the php installation to the log error. – BlackFire27 Aug 5 '12 at 5:19
Anything written to stderr should end up in the webserver log file - you don't need to do anything other than tell PHP to log errors. – symcbean Aug 6 '12 at 10:24

You did not mention anything about your investigation on the database server.

If it's mysql, you can compare max_connections and the output of show full processlist.

Note that the fault isnt my car. My cars works, whenever you stay around 20mph. Just don't go above 30 mph with it :)

share|improve this answer
hmm.. i dont thing max connections has got to do with it.. it is more connection time.. but thanks for the help – BlackFire27 Aug 2 '12 at 14:00

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.