Re: time oddities on a script
| From: | David Robley | Date: | Fri, 07 Jul 2000 01:09:29 +0000 |
| Subject: | Re: time oddities on a script | ||
| References: | 1 | Groups: | php.general php.windows |
| Request: | Send a blank email to php-general+get-5297@lists.php.net to get a copy of this message | ||
On 6 Jul, Kathleen Ballard wrote:
> Dear List,
> I have a new application running on nt/iis. The site is using a mysql
> 3.22.23b database on a unix box. The php is version 3.0.15. The app ran
> without problem for the first 2 weeks. Then the mysql server blocked the
> connection requests from the website. According to the isp, this was
> because of many script timeouts cause by one of the php3 pages. At the
> point when the timeout problems started, I had made no code changes to the
> page (which had previously been running without problem).
>
> In an effort to get more information about when/how often this page is
> timing out, I have inserted code to log to a text file each time the page is
> accessed using the execution_timer_class that was recently posted to this
> list.
>
> The data I am logging to the file is:
>
> date formatted date/time the script is accessed
>
> start_time using the function start_time() from the execution_timer_class
>
> page_id the main record from the mysql table being accessed for this page
> view
>
> elapsed_time again using the functions from the execution_timer_class,
> end_time() and elapsed_time
>
> ~~~~~~~~~~~~~~~~~~~~~~~~
>
> I have about 100 records now and have noticed 2 puzzles about the
> elapsed_time field..
>
> In one instance, elapsed_time is a little over 942 seconds. How is this
> possible?
>
> Additionally, about 1 tenth of the records have a negative number as the
> elapsed_time. Again, how does that happen?
>
>
> Also, any suggestions on how to track down this problem? Would persistent
> connections be the answer?
>
> Kathleen
>
The reason you are getting a negative number is possibly that the value
has exceeded the capacity of the variable to store it.
Some things you might do to track down the problem (wild guesses because
I have no idea what your script is doing)
1) set your max_execution_time lower, to prevent scripts from running
wild
2) Maybe there are values which are exceeding the storage space, either
in the script or tables??
3) Check your scripts for possible 'endless loops' in some
circumstances.
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA