Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache Slow serving request - How to debug ? |
|
Author |
|
jbenezech
Joined: 12 Aug 2011 Posts: 2
|
Posted: Sat 13 Aug '11 2:57 Post subject: Apache Slow serving request - How to debug ? |
|
|
Hi All,
I have a little web based app running on Apache 2.2, XP SP2, with a perl cgi backend. The cgi outputs text/xml content.
I am currently running that locally on my computer and using Firefox to access my app.
On my test page, apache is taking between 4 and 5 seconds to serve the request (taken from access.log with %T %D options) while my backend job takes less than 1 second to complete (time taken from first line of cgi to last line before exit).
The size of the output xml is 61k (taken from access.log)
There are no other big app running on my computer, plenty of free RAM and no swapping. I am the only client and only doing one request at a time.
The extra time taken by apache to serve the request compared to the time it took to complete the backend job seems extremely high and I have no idea where to look at.
I have read docs and forum about tunning but considering my config (1 client, 1 request...) it does not seem like a tunning thing as such.
Would you have any idea on how I can find out why apache is taking all this time to serve the request ?
Thanks
Jerome |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Sat 13 Aug '11 14:55 Post subject: |
|
|
Not sure what you mean with "perl cgi backend", assume perl on the same box as Apache runs.
Which version of Apache are you running and always good to upgrade to XP sp3 ?
What about non perl pages and pictures, are they served quick ?
In the windows taskmamanger you can look for the CPU apache consumes.
I think you know that %T is seconds and %D in microseconds.
Steffen |
|
Back to top |
|
jbenezech
Joined: 12 Aug 2011 Posts: 2
|
Posted: Sun 14 Aug '11 3:03 Post subject: Solved with mod_perl |
|
|
Problem solved installing mod_perl.
The extra seconds taken seemed to be initialisation and closing of perl interpreter.
Went from 5 seconds to 0.4 |
|
Back to top |
|
|
|
|
|
|