Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts

    mod_status and OPTIONS * HTTP/1.0

    I enabled mod_status on my server and the report is full of OPTIONS * HTTP/1.0.
    eg. I just took a random snapshop and there were 95 lines of requests and only 11 were actual website requests. The request were just OPTIONS * HTTP/1.0. I googled and just found people saying its nothing to worry about but unless I'm understanding the report wrong, those requests used 23 seconds of CPU time compared to 8 seconds for the real requests.

    I'm trying to diagnose some server load problems (mostly sits around 1-2 but about once a week - at different times the load goes 90+) and if these things really are nothing to worry about, is there any way I can remove them from the server status report, they're swamping the real data and just getting in the way

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Quote Originally Posted by NancyJ View Post
    I googled and just found people saying its nothing to worry about but unless I'm understanding the report wrong, those requests used 23 seconds of CPU time compared to 8 seconds for the real requests.
    Those requests are Apache polling itself and checking to see if it's child processes are responding. It's completely normal and nothing to worry about.

    Not sure what you are looking at in terms of the CPU time, but those should be almost instant. Perhaps you can provide more info?
    Quote Originally Posted by NancyJ View Post
    I'm trying to diagnose some server load problems (mostly sits around 1-2 but about once a week - at different times the load goes 90+) and if these things really are nothing to worry about, is there any way I can remove them from the server status report, they're swamping the real data and just getting in the way
    Where is the report coming from? There are a number of log parsing utilities out there. Is there anything common about when your load spikes? Such as the time of day, or when a certain page/process is run? Not sure what steps you are taking to diagnose, but if possible you should run top on the server when the load is high so you can see which process(es) are taking up your resources. You may have done that already(maybe that's why you are looking at apache ) and it's a good place to start.

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    The report comes from mod_status. This is an example of a report from this morning, the number of these requests increases over time - as if they never go away. Other requests go away once they've been dealt with. When I first booted up the server the report was 12Kb, 9 hours later its nearly 40Kb.

    I'm trying to store these reports (taking 1 per minute at the moment) because the load spikes can happen at any time of any day, there's no pattern - and when they do, the sever wont let me in on SSH so I can't look at top or do anything about it. It did happen once when I was already logged in to the server and the only thing top showed was a load of httpd processes. I turned off apache, waited for the load to drop and then turned apache back on and all was fine again. As best I can tell, if there's no-one there to do that the load stays ridiculously high and the sites are unavailable indefinitely - it once went like that at midnight and stayed that way until 8am when someone asked the host to fix it. (they've also asked the host to tell us why this keeps happening but they just shrug and say they don't know). So my plan is, next time it happens to have the previous 24 hours worth of reports so I can look at what was going on with apache in the minutes or hours leading up to the problem.

    I have 3 clients sharing the server and they have nearly 150 sites on it (although, only about 5 that get any real traffic) with cpanel so the access logs are all separate so they're a major pita to examine if I want to look at them all - especially when I don't know what I'm looking for. My guess is that they've got a wordpress, joomla or some such thing install somewhere that they've forgotten about and bots are going crazy trying to get into it (or getting into it and doing stuff!)... they tend to do that - set up a subdomain, install some open source package, lose interest, forget all about it and just leave it there. One of the things they installed and forgot about allowed 3rd parties to execute code on the server, luckily it was just bored script kiddies and no real harm was done but it could have been so much worse.

  • #4
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    I've just compared the report with my own server and all but about 2 of them have shown as 0 CPU time, on the problem server, while a couple show as 0, most are at least 0.1s and one was 0.87s! Everything I've read says they're perfectly normal, nothing to worry about, they don't affect load - how can something use nearly 1 second of CPU and not be affect load?

  • #5
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Quote Originally Posted by NancyJ View Post
    how can something use nearly 1 second of CPU and not be affect load?
    That request is not the problem. Regardless of how long it takes to run, it's part of the normal operation. I have some of them taking up more than 3 seconds of CPU time without adverse effects.

    Do you have access to WHM?
    If so: which MPM are you using for Apache?
    You can get some more info about processes in the Daily Process Log and the Process Manager in the System Health section of the WHM menu.

  • #6
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,172
    Thanks
    19
    Thanked 65 Times in 64 Posts
    The process manager doesn't show any more information than I can get from top (and I can't access WHM during an incident). The only thing that looks odd in the daily process log is the memory usage of user "nobody" on each day that there was a problem was high roughly proportional to how long the problem persisted. eg. when it was down for 8 hours, the daily memory usage for "nobody" was 38% - compared to normally 1%, when it was down for about an hour it was 4%.


    I was able to get into the current running processes eventually during a problem period and there was a lot of this: (where / should be the folder where the webpage thats being accessed lives on the server)
    26522 (httpd) /usr/local/apache/bin/httpd / /usr/local/apache/bin/httpd -k restart -DSSL

    Looking at it currently it still shows a load of those now when we're not having a problem - in fact they're the only httpd processes listed, whereas when we were having a problem there were over 200 including the blank ones.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •