Connection time out.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Deddog
Forum Commoner
Posts: 55
Joined: Thu Sep 26, 2002 6:05 am
Location: Brighton

Connection time out.

Post by Deddog »

I run Apache 2 on nt4 server with php and mysql version 4.

My existing system ran fine until Monday morning. Now I get generally get time out’s when my pages try to connect to mysql.

I have reinstalled both Mysql and PHP. I checked the databases and they seem fine. I am using mysql_connect to get data from mysql.

What has caused the system to keep timing out?

I am stuck and running out of time!

Deddog.
rterrar
Forum Newbie
Posts: 8
Joined: Wed Aug 06, 2003 12:32 am

Post by rterrar »

Are you using some kind of loop statement to access your records?

I would try first resetting the time out in your code.
set_time_limit(0); means no time limit.
I would use something like set_time_limit(60).
Also if you put the set_time_limit() call in your loop to run like every 10th iteration it will reset the time limit. Of course this could all be spoiled by the max_execution_time setting in the php.ini file if it is set. This times the loop and kills it after the time limit imposed.
Post Reply