Mail::Box fails miserably when trying to open 30_000 messages maildirby monsieur_champs (Curate)
|on Jun 26, 2005 at 02:52 UTC||Need Help??|
monsieur_champs has asked for the wisdom of the Perl Monks concerning the following question:
I'm working for a client that asked me to build something he can use to inspect a catch-all mailbox at his ISP linux box. My client is an organized and clever half-techie that understands little about perl and a lot about linux. He is using Debian stable distro, with perl 5.6.1 and a bunch of libs that I've asked him to install for my use.
I've choosen Mail::Box because of its stability and powerfull control and broad range of supported formats.
At development, everything goes fine, and Mail::Box::Manager uses Mail::Box::Maildir and Mail::Box::Message to create me an ideal world where all works as expected: messages go back and forth, and I can see and handle all requirements.
Things change a lot at production (I have little access to production, so please take it easy! -- this is a business requirement from my client). The same program that works at my development environment and performs quite well fails miserably when facing the 30_000 (yes, that's four zeros on the right hand) messages on a single maildir folder. My main problem is that I don't have a formal failure: Mail::Box just leave open() telling everybody that there is no messages at this maildir folder(?!?!). I'm really confused about this error and can't figure out a good way to tell if I'm missing something really important or just need a good afternoon of debugging Perl internals.
I've wrote the following code to try to expose the fail. Hope I've setted all erros at the maximum noise level. Comments and related cases are welcome. My client will make tests in one or two days, and I will have more information to complement this post then.