The PHP Live! system contains an ajax/ directory that has several PHP files that are requested periodically by the operator console, visitor chat window and the PHP Live! HTML Code. The periodic requests performs various tasks to update the operator status, chat status, visitor footprint status and more. The requests are very fast and takes milliseconds to process with very minimal CPU usage. But each request does get logged to the web server log files.
For high volume traffic websites, you may want to separate or pause the frequent ajax/ directory from logging to the web server. If the web server log file gets to large, it will eventually slow down the web server. This documentation explains how to separate the ajax/ directory requests from being logged to the general web server log files. You will need to setup conditional logging within the web server (Apache, IIS, etc) conf file. For web servers other then Apache, the procedures are similar.
The concept is to separate the frequent ajax/ folder requests to a new log file. Essentially, you'll want to stop all logging to the general log file but filter the ajax/ requests to a new log file.
Edit your apache httpd.conf file and add the following lines to your virtual host. Keep in mind, your system may have a different directory and log file names.
SetEnvIf Request_URI ajax/ ajax
CustomLog logs/access.log common env=!ajax
CustomLog logs/access_ajax.log common env=ajax
To pause all logging of the ajax/ directory requests altogether, comment out or do not include the last line from above (CustomLog logs/access_ajax.log common env=ajax). To separate or pause the entire phplive/ directory, substitute the above ajax/ directory to the phplive/ directory.
Was this helpful?
could be more helpful? send comment
4 people found this helpful