php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20819 max_execution_time ignored when waiting for open socket read
Submitted: 2002-12-04 17:21 UTC Modified: 2002-12-04 18:10 UTC
From: richard at zuidhof dot nl Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.2.3 OS: Linux 2.2.20 (Debian)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: richard at zuidhof dot nl
New email:
PHP Version: OS:

 

 [2002-12-04 17:21 UTC] richard at zuidhof dot nl
When PHP is waiting for a socket read the max_exection_time parameter is ignored. I was trying to use PHP scripts to monitor server response times but when there is a problem the script does not kill itself. 

It does not matter how I specify the max_execution_time. For instance like this:
php4 -d max_execution_time 5

This behaviour was already in all previous versions I used.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-04 18:10 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use stream_set_timeout() to set the socket read timeouts, since socket reads don't take cpu time, which is what max_execution_time is referring to. While your script is sitting on a socket waiting for data, it does not use any CPU time.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 17:01:31 2024 UTC