• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cron Daemon error - emails continually sent every hour

shortlc

New Pleskian
I have restarted the VPS, now I have received about 6 emails at the beginning of every hour:

From: [email protected]
Subject: Cron <root@vps21157> /usr/local/psa/admin/bin/php -c '/usr/local/psa/admin/conf/php.ini' -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/plesk-mobile/scripts/push_worker.php'

Email: 2014-05-22T17:10:01+02:00 ERR (3) [panel]: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_2200_0.MYI' (Errcode: 28):
0: Pdo.php:234
Zend_Db_Statement_Pdo->_execute(array)
1: Statement.php:300
Zend_Db_Statement->execute(array)
2: Abstract.php:479
Zend_Db_Adapter_Abstract->query(string 'DESCRIBE `Modules`', array)
3: Abstract.php:238
Zend_Db_Adapter_Pdo_Abstract->query(string 'DESCRIBE `Modules`', array)
4: Mysql.php:19
Db_Adapter_Pdo_Mysql->query(string 'DESCRIBE `Modules`')
5: Mysql.php:169
Zend_Db_Adapter_Pdo_Mysql->describeTable(string 'Modules', NULL null)
6: Abstract.php:835
Zend_Db_Table_Abstract->_setupMetadata()
7: Abstract.php:874
Zend_Db_Table_Abstract->_setupPrimaryKey()
8: Abstract.php:982
Zend_Db_Table_Abstract->info()
9: Select.php:100
Zend_Db_Table_Select->setTable(object of type Db_Table_Broker_Modules)
10: Select.php:78
Zend_Db_Table_Select->__construct(object of type Db_Table_Broker_Modules)
11: Abstract.php:1018
Zend_Db_Table_Abstract->select()
12: Abstract.php:1331
Zend_Db_Table_Abstract->fetchAll(string '`name` = 'plesk-mobile'')
13: Abstract.php:140
Db_Table_Abstract->findByField(string 'name', string 'plesk-mobile')
14: Abstract.php:152
Db_Table_Abstract->findOneByField(string 'name', string 'plesk-mobile')
15: Context.php:28
pm_Context::init(string 'plesk-mobile')
16: bootstrap.php:16
require_once(string '/usr/local/psa/admin/plib/modules/plesk-mobile/bootstrap.php')
17: push_worker.php:11
ERROR: Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_2200_0.MYI' (Errcode: 28) (Pdo.php:234)
 
Hi,

Can you please check your /tmp disk space status, May be it's 100% full and due to that you are getting this issues.

Code:
df -h 

df -i
 
Hi,

Can you please check your /tmp disk space status, May be it's 100% full and due to that you are getting this issues.

Code:
df -h 

df -i

df -i
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/root              23G  9.4G   13G  44% /

df -i
Code:
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/root            1507328 1507328       0  100% /
 
As you can see there are no free inodes. Increase them for this VPS from hardware node.
 
Yes, You will have to increase it from your your hardware node

OR

try to find out which directory is using high disk inodes on your server. You can check it through following command.

Code:
cd /

for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
 
try to find out which directory is using high disk inodes on your server. You can check it through following command.

Code:
cd /

for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10

Result:
Code:
[root@vps21157 ~]# cd /
[root@vps21157 /]#
[root@vps21157 /]# for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
find: unknown predicate `-horde_conf.flag'
find: File system loop detected; `var/named/chroot/var/named' is part of the same file system loop as `var/named'.
sort: cannot create temporary file in `/tmp': No space left on device
96670 usr
39268 proc
23422 sys
3663 lib
2189 dev
1812 etc
971 root
382 lib64
265 sbin
118 bin
 
try to find out which directory is using high disk inodes on your server. You can check it through following command.

Code:
cd /

for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10


Results:

[root@vps21157 data]# cd /
[root@vps21157 /]# for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
find: unknown predicate `-horde_conf.flag'
find: File system loop detected; `var/named/chroot/var/named' is part of the same file system loop as `var/named'.
sort: cannot create temporary file in `/tmp': No space left on device
96670 usr
40432 proc
23422 sys
3663 lib
2190 dev
1812 etc
971 root
382 lib64
265 sbin
118 bin
 
try to find out which directory is using high disk inodes on your server. You can check it through following command.

Results:

[root@vps21157 /]# for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
find: unknown predicate `-horde_conf.flag'
find: File system loop detected; `var/named/chroot/var/named' is part of the sam e file system loop as `var/named'.
1406254 var
96665 usr
31747 proc
23422 sys
3663 lib
2190 dev
1809 etc
971 root
382 lib64
265 sbin
 
After deleting a number of log files and manuals, here's what I have now:

Code:
# for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
find: unknown predicate `-horde_conf.flag'
find: File system loop detected; `var/named/chroot/var/named' is part of the same file system loop as `var/named'.
1411472 var
64671 usr
37787 proc
23422 sys
3663 lib
2189 dev
1790 etc
1134 root
382 lib64
265 sbin

And I now have 26943 inodes available:
Code:
# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
rootfs               1507328 1480385   26943   99% /
/dev/root            1507328 1480385   26943   99% /
devtmpfs              255333    2188  253145    1% /dev
tmpfs                 255448       1  255447    1% /dev/shm
/dev/root            1507328 1480385   26943   99% /var/named/chroot/etc/named
/dev/root            1507328 1480385   26943   99% /var/named/chroot/var/named
/dev/root            1507328 1480385   26943   99% /var/named/chroot/etc/named.rfc1912.zones
/dev/root            1507328 1480385   26943   99% /var/named/chroot/etc/rndc.key
/dev/root            1507328 1480385   26943   99% /var/named/chroot/usr/lib64/bind
/dev/root            1507328 1480385   26943   99% /var/named/chroot/etc/named.iscdlv.key
/dev/root            1507328 1480385   26943   99% /var/named/chroot/etc/named.root.key

But most importantly, free inodes decreased to 26881 in less than 1 minute

How, I do not know, and therefore isn't going to be long before I reach this issue again.
 
So the issue was that I had 100,000+ session files in /lib/php/session

I used:
Code:
[ -x /usr/lib64/plesk-9.0/maxlifetime ] && [ -d /var/lib/php/session ] && find /var/lib/php/session -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib64/plesk-9.0/maxlifetime) -delete
to delete the sessions. I went from 99% inode usage to 6%. Will have to work on a cron job to do this daily or something.
 
Back
Top