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

  • Home
  • SEARCH
  • 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 5971291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:29:47+00:00 2026-05-22T20:29:47+00:00

What is the best way to log http requests for a web application, including

  • 0

What is the best way to log http requests for a web application, including ajax requests, so that I can later go back and query “I want to know how many times this request was made, and how long it took to complete on average”, or “show me the top 5 highest average time requests”

Would you use a separate database from the current production db to log these things to prevent all of those inserts causing IO slowdown, or does this end up not really making a big impact?

Would you bulk up requests and then push to the DB or would you do a single insert for each request?

Is there a better way to add this request logging in with timings besides wrapping each request handler in the application logic like:

start = CurrentTime()
/* request handler code */
end = CurrentTime()
Insert(requestName, start, (end - start))
  • 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-22T20:29:47+00:00Added an answer on May 22, 2026 at 8:29 pm

    You should be able to use your web server logs for this purpose. Apache and IIS logs both capture URL, query string, response code and duration. If the AJAX requests receive data via HTTP POST you will need to change the web server’s configuration to capture that data if it’s important to you. Then the best tool I’ve found for log analysis is Microsoft’s Log Parser, which does a great job working with large files with a SQL syntax to calculate answers to the kinds of questions you’re asking.

    However, if you’re intent on rolling your own, use some sort of local logging. And use a logging framework – such as log4J – which is smart enough to buffer out disk writes to minimize I/O, roll the log files, and delete old files. This is more scalable approach for clustered servers, otherwise each is hitting the database constantly. If you want to put the data in a table, make it a batch process, once an hour or day for instance.

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

Sidebar

Related Questions

I'm looking for the best way to log errors in an ASP.NET application. I
How do I make a form that can log into two places simultaneously? http://img577.imageshack.us/img577/3127/calendarlogin.jpg
What would be the best way to write log statements to a file or
What is the best way to get a log of commits on a branch
What is the best way to verify/test that a text string is serialized to
What is the best way to make an HTTP GET request in Ruby with
How is the best way to handle any occuring errors in a Sivlerlight application?
I have a log file that can get pretty big. The information in my
I've got a web application that is used by a company for logging their
Possible Duplicate: Best Way to Sprite Images? I have the following image that I

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.