We're finding high traffic servers fail to rotate log files if they have webstats enabled. In the daily log rotation and webstats execution, Plesk 11.5 calls this command against each domain's access_log.webstat log file:
sh -c /bin/sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n /var/www/vhosts/system/domain/logs/access_log.webstat | /usr/bin/webalizer -c /var/www/vhosts/system/domain/conf/webalizer.conf -n domain -D /usr/local/psa/var/webalizer/webalizer.cache -N 15 -F clf -
If the file is huge; i.e. larger than the system's memory, the sort command then proceeds to use all of the memory on the server, ultimately fails because the operating system kills the command off via the linux OOM killer, Plesk's 'statistics' or 'web_statistic_executor' commands never complete, so log rotation never occurs and the file just keeps growing each day.
We have sites that log 20+ gigs of log data per day and can't rotate their logs or complete their webstats because of this issue.
Can whatever Plesk program that's calling sort be edited? Then we could add a -S flag to tell it how much memory to use instead of letting it crash each night.
sh -c /bin/sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n /var/www/vhosts/system/domain/logs/access_log.webstat | /usr/bin/webalizer -c /var/www/vhosts/system/domain/conf/webalizer.conf -n domain -D /usr/local/psa/var/webalizer/webalizer.cache -N 15 -F clf -
If the file is huge; i.e. larger than the system's memory, the sort command then proceeds to use all of the memory on the server, ultimately fails because the operating system kills the command off via the linux OOM killer, Plesk's 'statistics' or 'web_statistic_executor' commands never complete, so log rotation never occurs and the file just keeps growing each day.
We have sites that log 20+ gigs of log data per day and can't rotate their logs or complete their webstats because of this issue.
Can whatever Plesk program that's calling sort be edited? Then we could add a -S flag to tell it how much memory to use instead of letting it crash each night.