[Bioperl-l] too many open files
Gudmundur A. Thorisson
mummi@cshl.org
Thu, 07 Nov 2002 00:07:40 +0000
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.
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
>
>
>