poddys Posted November 2, 2011 Share Posted November 2, 2011 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). Quote Link to comment https://forums.phpfreaks.com/topic/250285-do-apache-errorswarnings-affect-performance/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 2, 2011 Share Posted November 2, 2011 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.) Quote Link to comment https://forums.phpfreaks.com/topic/250285-do-apache-errorswarnings-affect-performance/#findComment-1284239 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.