note 68183 added to function.file-get-contents
| From: | andrew at flypublishing dot com | Date: | Mon, 17 Jul 2006 14:48:35 +0000 |
| Subject: | note 68183 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114846@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 64.71.164.2
Probable Submitter: 71.106.1.144
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php
Edit -- http://master.php.net/note/edit/68183
Del: integrated -- http://master.php.net/note/delete/68183/integrated
Del: useless -- http://master.php.net/note/delete/68183/useless
Del: bad code -- http://master.php.net/note/delete/68183/bad+code
Del: spam -- http://master.php.net/note/delete/68183/spam
Del: non-english -- http://master.php.net/note/delete/68183/non-english
Del: in docs -- http://master.php.net/note/delete/68183/in+docs
Del: other reasons-- http://master.php.net/note/delete/68183
Reject -- http://master.php.net/note/reject/68183
Search -- http://master.php.net/manage/user-notes.php