|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59851 HTTP Requests will intermittently timeout
Submitted: 2011-07-16 11:15 UTC Modified: 2012-02-21 13:30 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: dh at cross-solutions dot se Assigned:
Status: No Feedback Package: pecl_http (PECL)
PHP Version: 5.3.6 OS: Arch Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-07-16 11:15 UTC] dh at cross-solutions dot se
I create a HttpRequest object for an SSL site (paypal) with METH_POST method.
Every hour or so I have to restart the apache server because all I get is "SSL request reached timeout" in my $message->send(). The length of the timeout does not matter (I've increased it to minutes with setOptions(), it just takes longer but it still times out). 

The funny thing is that while the request times out from PHP, I can make the exact same one with curl in a shell just fine, which suggests there is a problem with the php module.

Reproduce code:
    $message = new HttpRequest( "", HttpRequest::METH_POST );
        	"X-PAYPAL-SECURITY-USERID" => "<replace_with_userid>", // I have removed our company's user ID here
        	"X-PAYPAL-SECURITY-PASSWORD" => "<replace with password>", // And password
            "X-PAYPAL-SECURITY-SIGNATURE" => "<replace with signature>", // And signature
            "X-PAYPAL-APPLICATION-ID" => "<replace with app ID>" ) );
    $message->setPostFields( "bogus" );
        $response = $message->send();
        if ( $response->getResponseCode() == 200 )
             echo "Woohoo!";
    catch ( HttpException $exception )
        echo "$exception\n";

Expected result:
I get a response back from the server every time I make the request.

Actual result:
After a number of successful requests, I only get timeouts until I restart the apache server.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-16 11:38 UTC] dh at cross-solutions dot se
The exact exception is:

exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in /srv/http/food/request_preapprove_key.php:0 inner exception 'HttpRequestException' with message 'Timeout was reached; Connection time-out (' in /srv/http/food/request_preapprove_key.php:81 Stack trace: #0 /srv/http/food/request_preapprove_key.php(0): HttpRequest->send() #1 {main}
 [2011-10-19 14:39 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2011-10-19 14:39 UTC]
-Status: Open +Status: Feedback
 [2012-02-21 13:30 UTC]
-Status: Feedback +Status: No Feedback
 [2012-02-21 13:30 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 07:01:34 2024 UTC