Edit report at https://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: Feedback +Status: No Feedback Type: Bug Package: Sockets related Operating System: Ubuntu 10.10 PHP Version: 5.3.3 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2010-11-23 04:39:28] [email protected] 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. ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=53380&edit=1
