php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1511 Huge delay/hang when reading sockets...
Submitted: 1999-06-08 16:19 UTC Modified: 1999-06-18 11:54 UTC
From: danbeck at scott dot net Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0.9 OS: Linux (RedHat 5.2)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 + 14 = ?
Subscribe to this entry?

 
 [1999-06-08 16:19 UTC] danbeck at scott dot net
The following code causes about a 10 to 15 second delay/hang before finishing.  I'm not sure why it takes so long to read from the socket, the server here on our LAN returns a reponse to the initial fwrite() almost instantly...  I have a perl script that uses similar code and it's instantaneous.


$socket = fsockopen($h_addr, $h_port, &$errno, &$errstr);

$cmd = "arbitrary data";
fwrite($socket, $cmd, strlen($cmd));

while (!feof($socket)){
  $buffer .= fread( $socket, 1024);
}

fclose ($socket);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-18 11:54 UTC] sas at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC