Skip Menu |

This queue is for tickets about the Frontier-RPC CPAN distribution.

Report information
The Basics
Id: 51756
Status: open
Priority: 0/
Queue: Frontier-RPC

People
Owner: Nobody in particular
Requestors: sean.poling [...] sun.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07b4
Fixed in: (no value)



Subject: Frontier::Client is limited to requests taking less than 180 seconds
It appears as though if you are requesting data form an XML-RPC server that takes longer than 180 seconds to return results Frontier::Client will fail with a 500 read error. This appears to be due to the default 180 second timeout within LWP::UserAgent. In order to handle requests that take longer than 180 seconds the timeout should be parameterized so that it can be specified to the Frontier::Client constructor and then passed to the LWP::UserAgent. The following in Frontier::Client->new: $self->{'ua'} = LWP::UserAgent->new; $self->{'ua'}->proxy('http', $self->{'proxy'}) if(defined $self->{'proxy'}); $self->{'rq'} = HTTP::Request->new (POST => $self->{'url'}); $self->{'rq'}->header('Content-Type' => 'text/xml'); Could be modified to: $self->{'ua'} = LWP::UserAgent->new; $self->{'ua'}->proxy('http', $self->{'proxy'}) if(defined $self->{'proxy'}); $self->{'ua'}->timeout($self->{'timeout'}) if(defined $self->{'timeout'}); $self->{'rq'} = HTTP::Request->new (POST => $self->{'url'}); $self->{'rq'}->header('Content-Type' => 'text/xml');
From: mmaslano [...] redhat.com
On Thu Nov 19 16:16:27 2009, seanpoling wrote: Show quoted text
> It appears as though if you are requesting data form an XML-RPC server > that takes longer than 180 seconds to return results Frontier::Client > will fail with a 500 read error. This appears to be due to the default > 180 second timeout within LWP::UserAgent. > > In order to handle requests that take longer than 180 seconds the > timeout should be parameterized so that it can be specified to the > Frontier::Client constructor and then passed to the LWP::UserAgent. > > The following in Frontier::Client->new: > > $self->{'ua'} = LWP::UserAgent->new; > $self->{'ua'}->proxy('http', $self->{'proxy'}) > if(defined $self->{'proxy'}); > $self->{'rq'} = HTTP::Request->new (POST => $self->{'url'}); > $self->{'rq'}->header('Content-Type' => 'text/xml'); > > Could be modified to: > > $self->{'ua'} = LWP::UserAgent->new; > $self->{'ua'}->proxy('http', $self->{'proxy'}) > if(defined $self->{'proxy'}); > $self->{'ua'}->timeout($self->{'timeout'}) > if(defined $self->{'timeout'}); > $self->{'rq'} = HTTP::Request->new (POST => $self->{'url'}); > $self->{'rq'}->header('Content-Type' => 'text/xml');
It would be great if you can think about including this change into the next release.
RT-Send-CC: mmaslano [...] redhat.com
On Mon Jun 25 10:34:03 2012, mmaslano@redhat.com wrote: Show quoted text
> > It would be great if you can think about including this change into the > next release.
FYI, Frontier::RPC doesn't really have an active maintainer. You may want to consider switching to one of the other XML-RPC modules on CPAN, or, if Frontier::RPC is useful in some way the others are not and there is interest, perhaps an active maintainer or maintainer(s) can be found. HTH!