note 68183 rejected from function.file-get-contents by nlopess
| From: | nlopess@php.net | Date: | Mon, 17 Jul 2006 14:56:16 +0000 |
| Subject: | note 68183 rejected from function.file-get-contents by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-114847@lists.php.net to get a copy of this message | ||
Note Submitter: andrew at flypublishing dot com
----
Hi, I've got lighty with fastcgi and php4 on RedHat with a fair amount
of traffic. (20,000 unique a day, 200,000 page views a day)
Everything has been running smooth for months. Last night I tried to
add my own webservice to the application. That is, I wrote a stand
alone webservice to handle one part of the app logic that can be called
via HTTP. So inside the PHP code I'll call:
$result =
file_get_contents("http://mydomain.com/service/getCount.php?u=$u");
and it returns the value for result. The reason I wanted this over HTTP
is so another server on a totally different box can call the same URL.
But this box just so happened to be the same box running the webservice
too. So mydomain.com could haved been 127.0.0.1.
Everything ran smooth for about 10 mins and then:
2006-07-16 20:33:33: (server.c.1225) [note] sockets disabled, out-of-fds
2006-07-16 20:41:17: (server.c.1131) NOTE: a request for
/index.php?data=gene timed out after writing 13032 bytes. We waited 360 seconds. If
this a pr
oblem increase server.max-write-idle
2006-07-16 20:43:31: (server.c.1190) [note] sockets enabled again
2006-07-16 20:43:31: (server.c.1225) [note] sockets disabled, out-of-fds
boom, it would totally crash. Had to stop lightly and kill all the php
processes and start up lightly to fix. Is there something wrong with
making an HTTP connection back to the same lighty server from within php
code? Am I leaking FD's by doing this?