1

At certain seemingly random parts of the day, my CPU usage will spike up from ~10% on 1 m1.large to 70% on 4 large servers. This all happens within 20 minutes and stays this way for a few hours and often while I'm asleep.

Assuming this is legitimate application traffic, how can I track exactly which http requests or cluster of HTTP requests are responsible for the CPU usage so I know what to optimize?

I've had a look at the apache http log but it doesn't help much because the number of requests is basically the same as it usually is.

3
  • What makes you think this is being caused by Apache requests and not, say, the compressing of the days logs? You may want to look at your cron jobs and other utilities that may be scheduling things at night.
    – Andrew M.
    May 14, 2012 at 20:25
  • Thanks for the response Andrew, this is definitely our application at work (a specific customer using the service). The high CPU utilization goes on for about 5-6 hours and we're running a barebones elastic beanstalk instance and don't have any cron jobs other than the ones Beanstalk uses.
    – Jack
    May 14, 2012 at 20:33
  • If you know the customer, then you should be able to replicate their actions--can you reproduce the issue you're seeing?
    – Andrew M.
    May 15, 2012 at 5:22

1 Answer 1

0

You can use Apache mod_status with extended status option to check running requests and time taken to process it. https://httpd.apache.org/docs/2.0/mod/mod_status.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .