That's not a Perl limit, that's an OS limit (or an OS library limit).
Praytell, what kind of thing are you doing where you need to keep a fileposition on 1024 files?
-- Randal L. Schwartz, Perl hacker | [reply] |
Thanks for your reply.
I, unfortunately, cannot say why the application requires 1024 filehandles. I am a humble project manager with no programming skills whatsoever.
| [reply] |
Actually, there is such a limitation, which as merlyn duely noted is an OS limitation, but it can be handled rather readily with the perl module FileCache. The module is rather simple to use, and modifieng the code should take very little time. In fact, I'd say you could do it in a few minutes, yourself.
Note: FileChache does not actually change your systems filehandle limit, rather it proceeds to open and close filehandles allowing you to write to files :) You could probably modify your system's Kernel to be able to open more files as well.
Another Note: I'm pretty sure this module should come standard with perl, but can't guarantee that.
Gyan Kapur
gyan.kapur@rhhllp.com | [reply] |
As already mentioned, this is a OS limit, not a Perl limit. Programmers of all creeds have been encountering the joys of hitting filehandle ceilings for years.
In fact, this is such a common problem for heavily used proxies that there's an entire section of the squid FAQ devoted to how to increase your filehandle limit.
Head on over to the squid FAQ (Troubleshooting) and scroll down to section 10.4 (Running out of filedescriptors). It covers how to solve the problem on a variety of UNIX-flavoured operating systems.
Paul Fenwick
Perl Training Australia | [reply] |