Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have millions of "File does not exist" errors each month in logs of my flash game website. Flash files call those unexisted files.

There are over 10000 different unexisted files in many variety of directories, extensions and referrers.

I want "File does not exist" errors to be not logged. Can't figure out a way to do it. Can you help me? I don't want to use htaccess.

Using php, mysql, apache, Linux, os_CentOS 5

share|improve this question
You should try to find the cause for all this log messages. Why are your flash files trying to access nonexistent files? – Sven Nov 20 '11 at 19:04
It is not possible. Because there are over 10000 flash game files with over 500 different types of required files, score tables, images, videos, images etc.. Check to get the point. – nahha Nov 20 '11 at 21:25

You could use a logging daemon such as syslog-ng or rsyslog and have it drop lines that match certain patterns such as "File does not exist".

To get Apache to use syslog, you can change your logging directives to something like these:

CustomLog "|/usr/bin/logger -t 'apache'" combined
ErrorLog syslog
share|improve this answer
Would this cause to a slowness in sites? I get around 1M page view/day. To give an idea, my current system can handle barely 2M page view/day. – nahha Nov 20 '11 at 21:30
I have never tried to benchmark the overhead of using syslog rather than writing directly to files but I currently run a syslog-ng server that logs 3M hits per day just for the web tier (and it logs everything from logins to mail as well) without struggling in the slightest. My guess is that lower disk utilisation due to not logging the error messages will actually make your site faster. – Ladadadada Nov 20 '11 at 23:13
Thank you. I will try your solution and let you know the results. – nahha Nov 21 '11 at 8:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.