I am having trouble getting enough file handles, since it can sometimes use more than 256. Solaris' 32-bit stdio seems to be the source of the problem, even though Solaris 8 can support a bajillion per process.
host> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 3072
vmemory(kbytes) unlimited
The code below fails at 256, although ulimit would indicate that it shouldn't
#!/usr/bin/perl
use FileHandle;
for ($i=0;$i<2048;$i++){
$fd = new IO::File;
sysopen($fd, "$i", O_WRONLY | O_CREAT) or die "stopped at: $i:
+ $!\n";
$fd{"$i"} = $fd;
}
for ($i=0;$i<2048;$i++){
$fh = $fd{"$i"};
print $fh "test\n";
}
How to proceed? We built perl 5.8 with
useperlio=define d_sfio=undef
but that didn't work, presumably because perlio uses stdio. Any experience with sfio, or any indication that it will solve the problem? It seems that 64-bit perl would use the 64-bit stdio libraries that are not broken, but we need DBD::Oracle, and that seems to require 64-bit Oracle, and we are not quite there yet.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.