CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: General Discussions: General Questions:
Slow response time


New User

Mar 28, 2002, 6:40 AM

Post #1 of 5 (7174 views)
Slow response time Can't Post

Crazy Would anyone know how to troubleshoot a web host that responds very slowly to cgi scripts? Here's the deal; It's been a couple of weeks since users of my page ( have been complaining about 'super' slow response times. After requesting my hosting company to look at it (and a million back-and-forth emails and trouble tickets) a friend suggested that we should copy the main page but this time without any scripts, just plain html and images. Guess what, It loads in no-time.

I've been trying to find a way to find out what the heck is happening. I'll very much appreciate your ideas and feedback.



Mar 28, 2002, 9:55 AM

Post #2 of 5 (7172 views)
Re: [angelito] Slow response time [In reply to] Can't Post

Your main html page seems very slow for me on a cable modem.

Are all cgi scripts slow or just some or one?

New User

Mar 28, 2002, 10:12 AM

Post #3 of 5 (7169 views)
Re: [RedRum] Slow response time [In reply to] Can't Post

Thank you for your interest Paul. The main culprit is a banner rotation script that executes in each and every page (making the entire site almost unusable). I've tried other cgi's with similar frustrating results,

Try this page, which is a copy of the main page w/o scripts;

I'll appreciate your input.



Mar 31, 2002, 4:53 AM

Post #4 of 5 (7164 views)
Re: [angelito] Slow response time [In reply to] Can't Post

Hi Angelito,

I've tried both pages and the second one is really faster to load (adsl connection).

What does your script do? I mean does it make operations on a database to see what banners are shown, how much times, etc etc or are you just using a flat file?

Try to benchmark your code, and when it is sent to the browser, by putting timestamps at the start and end of the html, and around the place you call the banners routine (for example), maybe it can show up something interresting?

The host seems to have "normal" reply times, but the webserver may be on another machine:

Pinging [] with 32 bytes of data: 
Minimum = 183ms, Maximum = 196ms, Average = 190ms

Pinging [] with 32 bytes of data:
Minimum = 101ms, Maximum = 106ms, Average = 103ms

Pinging [] with 32 bytes of data:
Minimum = 183ms, Maximum = 186ms, Average = 184ms

Pinging [] with 32 bytes of data:
Minimum = 188ms, Maximum = 190ms, Average = 188ms

Did you tried to check the time it takes to run other scripts, try for example displaying a random line from a 100_000 lines txt file...??

If you have access to a few tools (or to something like a /proc filesystem) to see the machine's load charge and try to print the results from a script?

my $.02;


Mar 31, 2002, 3:25 PM

Post #5 of 5 (7160 views)
Re: [angelito] Slow response time [In reply to] Can't Post

Loaded fairly fast for me for both(cable modem), although the one wo banner was faster. Although cgi is a great choice for banner rotation you might want to look into javascript banner rotation, that way the actual rotation is done once the page is loaded, most sites i go to that receive a enormous ammount of traffic have javascript rotation scripts(which you can usually just "borrow" from view source. Anyways thats my idea on the matter, not sure why the script takes so long, it should be fairly simple, unless it logs banner out, views and all that other stuff.

Hope that helps :)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives