Edit report at http://bugs.php.net/bug.php?id=53380&edit=1
ID: 53380 Updated by: [email protected] Reported by: kontakt at beberlei dot de Summary: fgets() hangs on repetitive connection to same url -Status: Open +Status: Feedback Type: Bug Package: Sockets related Operating System: Ubuntu 10.10 PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: I can't find anything wrong here. The request is apparently successfully written (fwrite in PHP and the send() syscall return immediately, indicating it was put in the send buffer of the socket). Then, the script calls fgets, which tries to read from the socket. However, this operation times out. Likely, the server was not able to respond in such a short period of time (1 second). I suggest you increase the timeout and try again. Previous Comments: ------------------------------------------------------------------------ [2010-11-22 19:39:35] kontakt at beberlei dot de Description: ------------ I stumbled into this bug where fgets() hangs on me as long as the connection timeout with a http socket resource (CouchDB webserver). The reproduce code is a bit longish as i think it has to do with the fetching of the same url twice. It makes no difference though if i use Keep Alive or close Connections after usage. Code: http://pastie.org/1317962 Xdebug Output: http://pastie.org/1317997 Strace output is attached. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53380&edit=1
