Hi all
When running multiple HTTP requests via LWP, I occasionally get this error: select failed: no child processes. If I catch the error, and wait a little, I can repeat the request successfully.
The code from
LWP::Protocol::http which throws this error is this:
269 SELECT:
270 {
271 my $nfound = select($rbits, $wbits, undef, $se
+l_timeout);
272 if ($nfound < 0) {
273 if ($!{EINTR} || $!{EAGAIN}) {
274 if ($time_before) {
275 $sel_timeout = $sel_timeout_before
+ - (time - $time_before);
276 $sel_timeout = 0 if $sel_timeout <
+ 0;
277 }
278 redo SELECT;
279 }
280 die "select failed: $!";
281 }
282 }
It seems I am running into some system limit, but I can't figure out which. ulimit -a on this (linux) system outputs this:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 27968
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 16384
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 27968
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
And the limits as reported by BSD::Resource are as follows:
RLIMIT_CPU : -1
RLIMIT_OPEN_MAX : 16384
RLIMIT_LOCKS : -1
RLIMIT_VMEM : -1
RLIMIT_FSIZE : -1
RLIMIT_STACK : 10485760
RLIMIT_MEMLOCK : 32768
RLIMIT_NOFILE : 16384
RLIMIT_DATA : -1
RLIMIT_NPROC : 27968
RLIMIT_OFILE : 16384
RLIMIT_AS : -1
RLIMIT_CORE : 0
RLIMIT_RSS : -1
Any ideas what I can change to get around this?
thanks
Clint
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.