80GB+ logs in /opt php-fpm directory
Is it normal ? It shouldn't cPanel rotate them / delete them like any other logs in the system?
I have a relatively "small" system because of 480GB SSD used and I saw the space
was shrinking quickly.
Following du -h --max-depth=1 to see which folders are messing around with space
I found that in /opt/cpanel the php-fpm logs were 80+ GB. And not one of them at least at compressed stated. Like they never rotated / deleted.
It was something like this:
[root@mars php-fpm]# pwd
/opt/cpanel/ea-php70/root/usr/var/log/php-fpm
[root@mars php-fpm]# du -h
84G .
[root@mars php-fpm]#
[root@mars php-fpm]# ls -la
total 87316072
drwxrwx--- 2 nobody root 4096 Jan 14 03:48 .
drwxr-xr-x 3 root root 4096 Jul 24 18:10 ..
-rw------- 1 root root 56 Jan 14 03:48 error.log
-rw------- 1 root root 1211 Dec 21 10:35 error.log-20171224
-rw------- 1 root root 11896 Dec 30 21:54 error.log-20180101
-rw------- 1 root root 53529537436 Jan 7 03:28 error.log-20180107
-rw------- 1 root root 35882060611 Jan 14 02:42 error.log-20180114
-
Is it normal ? It shouldn't cPanel rotate them / delete them like any other logs in the system?
A similar situation has been discussed over an a thread on the below URL: According to this thread, an internal case number "CPANEL-14681" already is in progress. You can follow-up on the same thread for update on this from the cPanel team..0 -
Hi @chrismfz, Your code snippet actually shows the log being rotated; however, it may not be fully configured to how you like it: # cat /etc/logrotate.d/ea-php70-php-fpm /opt/cpanel/ea-php70/root/usr/var/log/php-fpm/*log { missingok notifempty sharedscripts delaycompress postrotate /bin/kill -SIGUSR1 `cat /opt/cpanel/ea-php70/root/usr/var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true endscript }
You may need to add 'rotate' and 'size' directives: HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples logrotate(8) - Linux man page Thanks,0
Please sign in to leave a comment.
Comments
2 comments