[ensembl-dev] problems fetching data from ensembl

Amelie Stein amelie.stein at irbbarcelona.org
Fri Mar 25 13:57:22 GMT 2011


It seems I have finally found a solution/workaround to my connection
problem -- waiting for about a minute between establishing the connection
and sending the query. Works well on the terminal, and to include it in
Perl scripts I have added  

 sleep(60);

in Registry.pm, between 

  my $dbh =
    DBI->connect( "DBI:mysql:host=$host;port=$port", $user, $pass );

and 

  my $res = $dbh->selectall_arrayref('SHOW DATABASES');


Apparently this problem occurs with all "large" queries, so using
DBI_TRACE=2 I identified other queries where the script hangs up, and
inserted sleep(60) statements there, depending on the particular data I
want to fetch. This process is a bit cumbersome, and the solution is far
from perfect, but it allows me to work with the Ensembl API at all. Maybe
this can also help others with similar connection problems.

best,
Amelie


On Tue, 15 Mar 2011 15:29:00 +0100
Amelie Stein <amelie.stein at irbbarcelona.org> wrote:

> Hello,
> 
> I'm experiencing an odd problem when trying to fetch data via the  
> Ensembl Perl
> API. My script never returns, and it cannot even connect to the registry
> (e.g. using the code from
> http://www.ensembl.org/info/docs/api/core/core_tutorial.html). I
> can log into the mysql server directly, so establishing the connection  
> itself
> should not be the problem. However, I cannot run all queries -- "show
> databases" never returns (and indeed seems to be the problem behind  
> connecting
> to the registry), although
> 
>   show databases like "%61%"
> 
> works fine. Could there be a problem related to the "size" of the  
> results? Has
> anyone else experienced similar issues? A message in the Nov 2010  
> archives
> looks like what I'm experiencing, but I could not find a solution in  
> that
> thread. I have contacted the helpdesk, but while we could narrow down  
> the
> problem, we haven't found a solution.
> 
> Any helpful suggestions would be appreciated!
> Amelie
> 
> 
> PS: sorry if this is a duplicate, I've tried to send the email  
> yesterday already but it seems it didn't get through.







More information about the Dev mailing list