[Biopython-dev] Memory problems with eutils.efetch_using_dbids ...

Andrew Dalke dalke at dalkescientific.com
Tue Dec 21 01:38:29 EST 2004


BONIS SANZ, JULIO wrote:
> I have tried the following code (see at the end).

> My problem is that I do it for several SNPs and each time some
> <urllib2.OpenerDirector instance at 0x01435F30> is stored in
> the RAM. At the end the system hungs up.
>
> Do you know how to free this memory?

I can't think of anything in what you do that would cause EUtils
to accumulate memory.  If you always get the OpenerDirector at the
same memory location then that means there's no memory leak at all
because that means it's always using the same memory.

All the efetch_using_dbids function does is create the properly
formated URL and pass the right data to NCBI.  What it returns
is the open network connection as a file handle.  Nothing more
is stored in the EUtils package.

How many snpInfoLines are you reading?  Does the network pause
as you reading it?  How does the system hang up?

Could you enable debugging by setting
   ThinClient.DUMP_URL = 1
   ThinClient.DUMP_RESULT = 1

?  The first shows the URL/POST data sent to NCBI and the second
shows all of the data returned from the server.

					Andrew
					dalke at dalkescientific.com




More information about the Biopython-dev mailing list