Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3229914
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:51:57+00:00 2026-05-17T16:51:57+00:00

If a page takes over a couple of seconds to process, I’d like Apache

  • 0

If a page takes over a couple of seconds to process, I’d like Apache to log that URL somewhere. Is this possible? I have a lot of sites, so I was looking for an automatic way to do this as opposed to proprietary code for each site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:51:57+00:00Added an answer on May 17, 2026 at 4:51 pm

    Take a look at http://httpd.apache.org/docs/2.2/mod/mod_log_config.html. You can setup a custom log that includes the time it took to serve the request.

    For example:

    LogFormat "%h %l %u %t \"%r\" %>s %b %D" common-time
    

    Would add the time in microseconds it took to serve the request as the last field of your logfile.

    You would add that line to your httpd.conf, then in each virtualhost where you want to use it, add this line:

    CustomLog logs/access_log_time common-time
    

    You could also create a new LogFormat that contains only exactly what you want, maybe like this:

    LogFormat "\"%r\" %D" measure-time
    

    In your virtualhost, you can have multiple logs, so you could have:

    CustomLog logs/access_log common
    CustomLog logs/access_log_time measure-time
    

    All that said, there’s a huge caveat. This will measure only the time it takes the server to serve the page. It will not include the time it takes to execute any javascript in the browser. If you need to measure javascript execution time, you’ll need to use a tool like firebug.

    Once you’ve got the log, you could use something like apachelog to parse the logfile to get only the requests that took longer than whatever threshold you want to use.

    I’m not sure if it’s possible to log only the long requests and bypss the parsing step. It might be, but i have a feeling it would take a significant amount of work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this page that does some funky database stuff that takes a couple
I have a php page that takes in a bunch of url parameters and
If I have a page that takes some amount of time to process, and
I have a script that takes a while. I'd like to display a page
I have a page that takes a few minutes to run. When I set
I have a MySQL query that sometimes takes over 1 second to execute. The
I have a query that running way too slow. the page takes a few
I have multiple dynamically set select boxes on my page (like over 100). I
If I have a PHP page that is doing a task that takes a
I have taken three textboxes over aspx page. A JavaScript function is associated with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.