I've got a couple of images along with a css file on my small site that do not exist around the server, so every time a customer comes Apache throws 3 404 errors in it's log. The products are hidden around the page, so it doesn't modify the display from the page. Our website works fine in testing and production atmosphere. We lately recieved a couple day traffic spike of 30,000-40,000 site visitors daily and apache slowed down to some halt, waiting 22-25 seconds before coming back almost anything to the browser.

Would the 404 errors tossed around the page alter the server performance?

Is really a 404 error more resource-intensive a normal request?

Any info re: the way in which Apache handles 404 errors could be appreciated.

Thanks, Sj

As commenter ajreal stated offered documents will raise the resource allocation, but any server reacting to some request will get some good assets.

Any pursuit made by Apache as reaction to any user interaction can lead to decreased performance for other customers even when it's so small - it's almost invisible.

Both software (memory smart) and hardware (physical restrictions and capacity smart) will work several actions to correctly answer and/or log user interaction.

Within this situation whenever your customers (30,000-40,000) visited the website, Apache still required to log many of these errors to be able to match the logging preferences set by configuration. Because the log file is simply a text file around the gard disk, hard disk was too busy to do reads and creates around the actual websites content.

The burden from the server could be even greater, if Apache would trow 404 error like a document. Regardless, the easiest method to improve server performance would be to eliminate any 404 errors completely.

You may also boost the MaxRequestsPerChild parameter in Apache config file to something around 1000 to lower the strain in one central Apache process, to multiple subprocesses. This can allow multiple Apache ways to span brand new ones simultaneously growing the strain to any or all CPU cores not just one.

Because of so many site visitors I'd also recommend altering the MPM of the Apache config to something similar to this :

<IfModule prefork.c>
StartServers       2
MinSpareServers    2
MaxSpareServers    5
ServerLimit        100
MaxClients         100
MaxRequestsPerChild  4000