Jump to content

Do Apache Errors/Warnings Affect Performance?


poddys

Recommended Posts

I inherited a system that "appears" to work most of the time, but on trying to figure out why it doesn't work 100% of the time I found that there are an enormous number of errors/warnings being reported in the Apache error logs.

 

Although I know most (I hope most) of these are not serious and ought not to affect the workings of the scripts, I wondered to what extent the logging of the errors would have on performance.

 

Sometimes these scripts do perform slowly, and I know that timeouts have been an issue in the past, where actions have not completed in time.

 

I have extended the time alloted for scripts to run before a timeout, and I am gradually going through the scripts and trying to eliminate all of the errors (which range from variables not defined to MySQL errors).

Link to comment
Share on other sites

The detection and handling of each statement that produces an error probably takes about 10 times longer than if the statement did not produce an error. A statement that would normally take 1ms, probably takes around 10ms. The actual reporting/display/logging of the error is just the last step in the error handling code that always gets executed every time an error is encountered as the code runs. Add to this the extra time when your script on any page ends for the actual write/append to the error log file (individual error messages are likely buffered, unless there is a huge quantity of them.) This would at most add a fraction of a percent to the execution time of a page.

 

Then there's your time spent trying to open and find relevant entries in a huge log file.

 

The quicker you find and eliminate the errors that are occurring when the script runs normally, the better for finding and fixing the errors that happen abnormally due to actual problems in the code (or hackers trying to break in.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.