Bug 459179 - config.cgi returns around 15MB of data when called with no parameters
Summary: config.cgi returns around 15MB of data when called with no parameters
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.2
Hardware: All
OS: Linux
medium
medium vote
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-14 20:02 UTC by David Lawrence
Modified: 2013-06-24 04:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-15 19:38:02 UTC


Attachments (Terms of Use)
Patch to have config.cgi use the shadow db is available (v1) (663 bytes, patch)
2008-08-14 20:02 UTC, David Lawrence
nelhawar: review+
Details | Diff

Description David Lawrence 2008-08-14 20:02:53 UTC
Created attachment 314353 [details]
Patch to have config.cgi use the shadow db is available (v1)

Description of problem:
Some clients are using config.cgi to get data from Bugzilla for use with 3rd party applications such as Eclipse, etc.

We need to either enforce that some parameters must be provided or somehow cache the data on the server side instead of hitting the database each time.

Another option is for the config.cgi script to use the shadow db if one is available.

Comment 1 David Lawrence 2008-08-14 21:09:22 UTC
Email from mschick:

So, poking through the logs and watching the processlist we noticed
config.cgi eating quite a bit of cpu time.  Grep'ing through the logs
showed a bunch of access by Eclipse client[1].  I hit the url manually
and got a 15M file returned after quite a lengthy pause:

time wget "https://bugzilla.redhat.com/config.cgi?ctype=rdf" -O out
--2008-08-13 16:09:51--
https://bugzilla.redhat.com/config.cgi?ctype=rdf
Resolving bugzilla.redhat.com... 209.132.176.231
Connecting to bugzilla.redhat.com|209.132.176.231|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/rdf+xml]
Saving to: `out'

    [
<=>                                ] 14,690,425   544K/s   in 27s     

2008-08-13 16:12:05 (525 KB/s) - `out' saved [14690425]


real    2m14.136s
user    0m0.528s
sys     0m0.442s

So it's taking ~1:45 seconds to generate the output which ends up as:
-rw-rw-r-- 1 mschick mschick 15M 2008-08-13 16:12 out

Anything we can do to make this faster or reduce the amount of data
returned?

[1] [10/Aug/2008:08:12:17 -0400] "GET /config.cgi?ctype=rdf HTTP/1.1"
200 1163264 "-" "Eclipse Mylyn (HttpClient/3.0.1)"

Comment 2 Noura El hawary 2008-08-15 05:07:59 UTC
Comment on attachment 314353 [details]
Patch to have config.cgi use the shadow db is available (v1)

Hey Dave,

The patch looks good to me, and it works fine, just getting a strict error for $dbh declaration 


>+$dbh = Bugzilla->switch_to_shadow_db();

so needs to be:

my $dbh = Bugzilla->switch_to_shadow_db();

Thanks,
Noura

Comment 3 David Lawrence 2008-08-15 17:09:32 UTC
Yeah that was a careless error. I will fix that when checking in the fix.

Thanks
Dave

Comment 4 David Lawrence 2008-08-15 19:38:02 UTC
Change committed to cvs that switches to to shadow db for these connections.

Dave


Note You need to log in before you can comment on or make changes to this bug.