[BioMart Users] Any solution for connect:timeout

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[BioMart Users] Any solution for connect:timeout

manjulapra
When I try to get data from COSMIC Biomart, I repeatedly get this error at various stages of the script

"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"

I am using only the perl API to access the database. Code is working some of the time but very slow also.

What may be the problem. This occurs even when Internet connection is very stable.

Additionally, what are the other formatters available other than 'TSV'

Any help is greatly appreciated.
Thanking in advance
Manjula



--


This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

Junjun Zhang
Hi Manjula,

When do you get the timeout error? Is it after you fired a query, or when you just started the Perl code.

The first time you run the perl code, the 'action' should be set to 'clean' so it gets all the meta info from data sources. But for better performance, in subsequent runs, 'action' should be set to 'cached' unless you wanted to rebuild your local registry to bring it in-sync with the source (when you think it's out of date).

If timeout happens during long running queries, you may consider to break a big long query into smaller one. Maybe you can show us some examples of your query, let's see if it could be optimized.

Cheers,
Junjun


From: Manjula Dharmawardhana <[hidden email]>
Date: Thu, 21 Jul 2011 12:27:52 -0400
To: "[hidden email]" <[hidden email]>
Subject: [BioMart Users] Any solution for connect:timeout

When I try to get data from COSMIC Biomart, I repeatedly get this error at various stages of the script

"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"

I am using only the perl API to access the database. Code is working some of the time but very slow also.

What may be the problem. This occurs even when Internet connection is very stable.

Additionally, what are the other formatters available other than 'TSV'

Any help is greatly appreciated.
Thanking in advance
Manjula



--


This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

manjulapra
Hi All,
I am getting the timeout error,
"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"
 most of the time. Here is my Registry file;

<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE MartRegistry> -->
<MartRegistry>
     <MartURLLocation 
         database="cosp" 
         default="1" 
         displayName="COSMIC (SANGER UK)" 
         host="www.sanger.ac.uk
         includeDatasets="" 
         martUser="" 
         name="CosmicMart" 
         path="/genetics/CGP/cosmic/biomart/martservice" 
        port="80" 
         redirect="1" 
         serverVirtualSchema="default" 
         visible="1"
     />
 </MartRegistry>






Here is my code

#!/usr/local/bin/perl

use strict;
use lib '/home/manjula/biomart-perl/lib';
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml";
print "Starting API\n";

print "using cached registry build\n";
my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

       
    $query->setDataset("COSMIC54");
    $query->addFilter("samp_gene_mutated", ["y"]);
    $query->addFilter("site_primary", ["liver"]);
    $query->addFilter("tumour_source", ["recurrent"]);
    $query->addAttribute("sample_name");
    $query->addAttribute("sample_source");
    $query->addAttribute("tumour_source");
    $query->addAttribute("gene_name");
    $query->addAttribute("accession_number");
    $query->addAttribute("site_primary");
    $query->addAttribute("hist_primary");
    $query->addAttribute("pubmed_pmid");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);
#my $resultNo=
print $query_runner->getCount();
#if ($resultNo>0) {
#print "Count is $resultNo\n";
#} else {
#print "No results\n";
#}
#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";
$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################


Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error,
1Getting unique rows
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.
Here 1 is the number of rows, then my print, after that the error. But I do  not get it all the time. Only getting it most of the time.
How can make this more reliable
Any help is greatly appreciated.

Thanking in advance
Manjula

This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

Junjun Zhang
Hi Manjula,

Thanks for providing the information, we will test it here and update you what we found out.

Best regards,
Junjun


From: Manjula Dharmawardhana <[hidden email]>
Date: Tue, 26 Jul 2011 10:14:20 -0400
To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi All,
I am getting the timeout error,
"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"
 most of the time. Here is my Registry file;

<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE MartRegistry> -->
<MartRegistry>
     <MartURLLocation 
         database="cosp" 
         default="1" 
         displayName="COSMIC (SANGER UK)" 
         host="www.sanger.ac.uk
         includeDatasets="" 
         martUser="" 
         name="CosmicMart" 
         path="/genetics/CGP/cosmic/biomart/martservice" 
        port="80" 
         redirect="1" 
         serverVirtualSchema="default" 
         visible="1"
     />
 </MartRegistry>






Here is my code

#!/usr/local/bin/perl

use strict;
use lib '/home/manjula/biomart-perl/lib';
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml";
print "Starting API\n";

print "using cached registry build\n";
my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

       
    $query->setDataset("COSMIC54");
    $query->addFilter("samp_gene_mutated", ["y"]);
    $query->addFilter("site_primary", ["liver"]);
    $query->addFilter("tumour_source", ["recurrent"]);
    $query->addAttribute("sample_name");
    $query->addAttribute("sample_source");
    $query->addAttribute("tumour_source");
    $query->addAttribute("gene_name");
    $query->addAttribute("accession_number");
    $query->addAttribute("site_primary");
    $query->addAttribute("hist_primary");
    $query->addAttribute("pubmed_pmid");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);
#my $resultNo=
print $query_runner->getCount();
#if ($resultNo>0) {
#print "Count is $resultNo\n";
#} else {
#print "No results\n";
#}
#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";
$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################


Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error,
1Getting unique rows
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.
Here 1 is the number of rows, then my print, after that the error. But I do  not get it all the time. Only getting it most of the time.
How can make this more reliable
Any help is greatly appreciated.

Thanking in advance
Manjula

This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

manjulapra
Hi Junjun and all,
Thank you for the quick reply.
I have tried many times and now I am getting;
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.

This error occurs before setting the Attributes and filters. Strange thing is that, it does not occur if I turn off getting the count and ask only for the data.

Regards,
Manjula

On Wed, Jul 27, 011 at 7:17 AM, Junjun Zhang <[hidden email]> wrote:
Hi Manjula,

Thanks for providing the information, we will test it here and update you what we found out.

Best regards,
Junjun


From: Manjula Dharmawardhana <[hidden email]>
Date: Tue, 26 Jul 2011 10:14:20 -0400
To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi All,
I am getting the timeout error,
"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"
 most of the time. Here is my Registry file;

<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE MartRegistry> -->
<MartRegistry>
     <MartURLLocation 
         database="cosp" 
         default="1" 
         displayName="COSMIC (SANGER UK)" 
         host="www.sanger.ac.uk
         includeDatasets="" 
         martUser="" 
         name="CosmicMart" 
         path="/genetics/CGP/cosmic/biomart/martservice" 
        port="80" 
         redirect="1" 
         serverVirtualSchema="default" 
         visible="1"
     />
 </MartRegistry>






Here is my code

#!/usr/local/bin/perl

use strict;
use lib '/home/manjula/biomart-perl/lib';
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml";
print "Starting API\n";

print "using cached registry build\n";
my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

       
    $query->setDataset("COSMIC54");
    $query->addFilter("samp_gene_mutated", ["y"]);
    $query->addFilter("site_primary", ["liver"]);
    $query->addFilter("tumour_source", ["recurrent"]);
    $query->addAttribute("sample_name");
    $query->addAttribute("sample_source");
    $query->addAttribute("tumour_source");
    $query->addAttribute("gene_name");
    $query->addAttribute("accession_number");
    $query->addAttribute("site_primary");
    $query->addAttribute("hist_primary");
    $query->addAttribute("pubmed_pmid");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);
#my $resultNo=
print $query_runner->getCount();
#if ($resultNo>0) {
#print "Count is $resultNo\n";
#} else {
#print "No results\n";
#}
#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";
$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################


Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error,
1Getting unique rows
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.
Here 1 is the number of rows, then my print, after that the error. But I do  not get it all the time. Only getting it most of the time.
How can make this more reliable
Any help is greatly appreciated.

Thanking in advance
Manjula

This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.





--


This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

Junjun Zhang
Hi Manjula,

They are two different issues for timeout error and Can't call method "getDisplayNames" on an undefined value.

You can easily fix the problem with timeout by setting the limit to a larger value in the code: lib/BioMart/Configuration/URLLocation.pm, looking for the following line:

$ua->timeout(20);

That means any query that takes longer than 20 seconds will be timed out. You may want to set it to something like 180 (3 minutes) so it won't easily time out slow queries.


The second problem is caused by the fact that 'count query' and 'data query' can not run one after the other without re-set the 'count' flag in the query object.

Your script should work fine if you re-set count to '0' before executing the data query as below:

############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);

print $query_runner->getCount();

#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";

$query->count(0);

$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################

Hope this helps,

Let me know if you have any further questions.

Cheers,
Junjun



From: Manjula Dharmawardhana <[hidden email]>
Date: Wed, 27 Jul 2011 01:36:38 -0400
To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi Junjun and all,
Thank you for the quick reply.
I have tried many times and now I am getting;
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.

This error occurs before setting the Attributes and filters. Strange thing is that, it does not occur if I turn off getting the count and ask only for the data.

Regards,
Manjula

On Wed, Jul 27, 011 at 7:17 AM, Junjun Zhang <[hidden email]> wrote:
Hi Manjula,

Thanks for providing the information, we will test it here and update you what we found out.

Best regards,
Junjun


From: Manjula Dharmawardhana <[hidden email]>
Date: Tue, 26 Jul 2011 10:14:20 -0400
To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi All,
I am getting the timeout error,
"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"
 most of the time. Here is my Registry file;

<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE MartRegistry> -->
<MartRegistry>
     <MartURLLocation 
         database="cosp" 
         default="1" 
         displayName="COSMIC (SANGER UK)" 
         host="www.sanger.ac.uk
         includeDatasets="" 
         martUser="" 
         name="CosmicMart" 
         path="/genetics/CGP/cosmic/biomart/martservice" 
        port="80" 
         redirect="1" 
         serverVirtualSchema="default" 
         visible="1"
     />
 </MartRegistry>






Here is my code

#!/usr/local/bin/perl

use strict;
use lib '/home/manjula/biomart-perl/lib';
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml";
print "Starting API\n";

print "using cached registry build\n";
my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

       
    $query->setDataset("COSMIC54");
    $query->addFilter("samp_gene_mutated", ["y"]);
    $query->addFilter("site_primary", ["liver"]);
    $query->addFilter("tumour_source", ["recurrent"]);
    $query->addAttribute("sample_name");
    $query->addAttribute("sample_source");
    $query->addAttribute("tumour_source");
    $query->addAttribute("gene_name");
    $query->addAttribute("accession_number");
    $query->addAttribute("site_primary");
    $query->addAttribute("hist_primary");
    $query->addAttribute("pubmed_pmid");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);
#my $resultNo=
print $query_runner->getCount();
#if ($resultNo>0) {
#print "Count is $resultNo\n";
#} else {
#print "No results\n";
#}
#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";
$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################


Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error,
1Getting unique rows
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.
Here 1 is the number of rows, then my print, after that the error. But I do  not get it all the time. Only getting it most of the time.
How can make this more reliable
Any help is greatly appreciated.

Thanking in advance
Manjula

This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.





--


This communication (including any attachments) is intended for the use of the intended recipient only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify [hidden email] by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Any solution for connect:timeout

manjulapra
Hi Junjun and all,
Thank you very very much.
It really helped.

Regards,
Manjula

On Thu, Jul 28, 2011 at 3:22 AM, Junjun Zhang <[hidden email]> wrote:
Hi Manjula,

They are two different issues for timeout error and Can't call method "getDisplayNames" on an undefined value.

You can easily fix the problem with timeout by setting the limit to a larger value in the code: lib/BioMart/Configuration/URLLocation.pm, looking for the following line:

$ua->timeout(20);

That means any query that takes longer than 20 seconds will be timed out. You may want to set it to something like 180 (3 minutes) so it won't easily time out slow queries.


The second problem is caused by the fact that 'count query' and 'data query' can not run one after the other without re-set the 'count' flag in the query object.

Your script should work fine if you re-set count to '0' before executing the data query as below:

############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);

print $query_runner->getCount();


#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";

$query->count(0);

$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################

Hope this helps,

Let me know if you have any further questions.

Cheers,
Junjun



From: Manjula Dharmawardhana <[hidden email]>
Date: Wed, 27 Jul 2011 01:36:38 -0400

To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi Junjun and all,
Thank you for the quick reply.
I have tried many times and now I am getting;
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.

This error occurs before setting the Attributes and filters. Strange thing is that, it does not occur if I turn off getting the count and ask only for the data.

Regards,
Manjula

On Wed, Jul 27, 011 at 7:17 AM, Junjun Zhang <[hidden email]> wrote:
Hi Manjula,

Thanks for providing the information, we will test it here and update you what we found out.

Best regards,
Junjun


From: Manjula Dharmawardhana <[hidden email]>
Date: Tue, 26 Jul 2011 10:14:20 -0400
To: jzhang <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: [BioMart Users] Any solution for connect:timeout

Hi All,
I am getting the timeout error,
"Problems with the web server: 500 Can't connect to www.sanger.ac.uk:80 (connect: timeout)"
 most of the time. Here is my Registry file;

<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE MartRegistry> -->
<MartRegistry>
     <MartURLLocation 
         database="cosp" 
         default="1" 
         displayName="COSMIC (SANGER UK)" 
         host="www.sanger.ac.uk
         includeDatasets="" 
         martUser="" 
         name="CosmicMart" 
         path="/genetics/CGP/cosmic/biomart/martservice" 
        port="80" 
         redirect="1" 
         serverVirtualSchema="default" 
         visible="1"
     />
 </MartRegistry>






Here is my code

#!/usr/local/bin/perl

use strict;
use lib '/home/manjula/biomart-perl/lib';
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile ="/home/manjula/TestMart/cosmicRegistry.xml";
print "Starting API\n";

print "using cached registry build\n";
my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 'action'=>$action);
my $registry = $initializer->getRegistry;

my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

       
    $query->setDataset("COSMIC54");
    $query->addFilter("samp_gene_mutated", ["y"]);
    $query->addFilter("site_primary", ["liver"]);
    $query->addFilter("tumour_source", ["recurrent"]);
    $query->addAttribute("sample_name");
    $query->addAttribute("sample_source");
    $query->addAttribute("tumour_source");
    $query->addAttribute("gene_name");
    $query->addAttribute("accession_number");
    $query->addAttribute("site_primary");
    $query->addAttribute("hist_primary");
    $query->addAttribute("pubmed_pmid");

$query->formatter("TSV");

my $query_runner = BioMart::QueryRunner->new();
############################## GET COUNT ############################
$query->count(1);
$query_runner->execute($query);
#my $resultNo=
print $query_runner->getCount();
#if ($resultNo>0) {
#print "Count is $resultNo\n";
#} else {
#print "No results\n";
#}
#####################################################################


############################## GET RESULTS ##########################
# to obtain unique rows only
print "Getting unique rows\n";
$query_runner->uniqueRowsOnly(1);

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();
#####################################################################


Strange thing is that, I get the timeout error when I use a clean registry build. When I use the cached registry I get this error,
1Getting unique rows
Can't call method "getDisplayNames" on an undefined value at /home/manjula/biomart-perl/lib/BioMart/QueryRunner.pm line 281.
Here 1 is the number of rows, then my print, after that the error. But I do  not get it all the time. Only getting it most of the time.
How can make this more reliable
Any help is greatly appreciated.

Thanking in advance
Manjula



_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users