[Bioperl-l] too many open files

Jason Stajich jason@cgt.mc.duke.edu
Wed, 6 Nov 2002 20:03:56 -0500 (EST)


On Thu, 7 Nov 2002, Gudmundur A. Thorisson wrote:

>   I had the same problem with a very similar massive-BLAST setup. Seems
> that Perl is not cleaning out the references to temporary BLAST output
> files that are created in each of the loop iterations, as it should do
> when the the object that is creates it goes out of scope.  I solved it
> by setting up a new Bio::Tools::Run::StandAloneBlast factory on each
> iteration, instead of always using the same one. This was after I tried
> explicitly calling the DESTROY() method on the resulting report object,
> sequence objects and just about anything I could think of that might be
> causing the problem.
>    I was thinking of submitting a bug report describing this some time
> ago, but never got around to it. I would guess that this is one of those
> cases where the dude who wrote the Blast factory code expects Perl to
> clean out tmpfile-refs that go out of scope (hell, I´ve made that
> mistake many times!), but Perl sometimes doesn´t do that so one should
> always be wise and call DESTROY() methods on objects and/or "undef" them.
>

I believe I have already fixed this by explicitly closing the tempfile
handles where appropriate.  This caused similar problems in the
Tools::Run::EMBOSSApplication code. I

We REALLY need someone who runs blast within perl to bulletproof test
StandAloneBlast as people seem to use this pretty heavily and it
currently does not have a maintainer (unless you're wanting to do this
too Mat?).

>
>
>                               Mummi, CSHL
>
>
>
> Dominik Gehl wrote:
>
> >Hi,
> >
> >I'm running automated blast queries on sequences in a database using
> >BioPerl.
> >Here's what I would like to do:
> >
> >for all genes in the database {
> >   create BioSeq object
> >   for all mutations for this gene {
> >       blast2seq(gene, sequence containing mutation)
> >       analyse :-)
> >   }
> >}
> >
> >Unfortunately, after around 1000 blasts I get the following error message
> >
> >Error in tempfile() using /tmp/XXXXXXXXXX: Could not create temp file
> >/tmp/SjdJjECirZ: Too many open files at
> >/usr/lib/perl5/site_perl/5.6.1/Bio/Root/IO.pm line 473
> >
> >Did anyone have similar problems ? Any suggestions ?
> >
> >Thanks a lot,
> >Dominik
> >_______________________________________________
> >Bioperl-l mailing list
> >Bioperl-l@bioperl.org
> >http://bioperl.org/mailman/listinfo/bioperl-l
> >
> >
> >
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason at cgt.mc.duke.edu