0

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\config.inc.php
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..

2 Answers 2

2

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.

2
  • I am clueless on how to connect the php installation to the log error. Aug 5, 2012 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, 2012 at 10:24
2

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 :)

1
  • hmm.. i dont thing max connections has got to do with it.. it is more connection time.. but thanks for the help Aug 2, 2012 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .