Skip Menu |

This queue is for tickets about the MediaWiki-API CPAN distribution.

Report information
The Basics
Id: 59360
Status: resolved
Priority: 0/
Queue: MediaWiki-API

People
Owner: Nobody in particular
Requestors: cristi.falcas [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: new parameter for LWP timeout
Hi, I have to upload some wikifiles that are generated from doc files. Some of the resulting files are big and on my computer (Pentium 4, 2.40GHz) it will timeout after 180 seconds. I have updated the needed parameters in apache and also in mediawiki configuration, but it still timeouts after 3 minutes. This seems to be the default timeout for LWP after all. Could you parametrizes the timeout? Currently I modified the API.pm file and added $ua->timeout( 600 ); at line 185. Thank you.
Show quoted text
> Could you parametrizes the timeout? Currently I modified the API.pm file > and added > $ua->timeout( 600 ); > at line 185.
you dont need to hack the api to modify lwp parameters. from the doc: Other useful parameters and objects in the MediaWiki::API object are * MediaWiki::API->{ua} = The LWP::UserAgent object. You could modify this to get or modify the cookies (MediaWiki::API->{ua}->cookie_jar) or to change the UserAgent string sent by this perl module (MediaWiki::API->{ua}->agent) so just create a new instance of the api and then add your parameters as you need. I dont really want to export all options from LWP as parameters for my module, as that means more things to maintain and to go wrong (if for example LWP changes something). Hope this helps.
Did you have any luck with my suggestion? Please post back to let me know if this has solved it for you.
From: cristi.falcas [...] gmail.com
On Fri Jul 16 19:00:10 2010, exobuzz wrote: Show quoted text
> Did you have any luck with my suggestion? Please post back to let me > know if this has solved it for you.
Your suggestion is OK. I'm not very good at perl and my issue is/was that the timeout was hidden from me: it was in a module used by the Mediawiki::API. I usually only learn the interfaces that I'm using directly, so it didn't occur to me that I need to read how the nested modules (used by the module I need) are working. Thank you very much for your work and for your help. Best regards, Cristian Falcas
I will attempt to make the documentation clearer in this respect. Thanks for the feedback.