Article ID: 129279, created on Aug 20, 2016, last review on Aug 20, 2016

  • Applies to:
  • Plesk Automation 11.5

Symptoms

Daily maintenance task fails every day with the output:

Request has been timed out, details:
system exception, ID 'IDL:omg.org/CORBA/TIMEOUT:1.0'
TAO exception, minor code = 3e (timeout during recv; low 7 bits of errno: 62 Timer expired), completed = MAYBE

The processes list shows it hangs on statistics calculation:

# ps -e f
...

root     11980  0.0  0.0  37628   724 ?        S    Jun16   0:03 /usr/local/pem/sbin/pleskd --props-file /usr/local/pem/etc/pleskd.props --send-signal
root      3880  0.0  0.5 211344 34684 ?        S    00:00   0:00  \_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/script.php
root     10235  0.0  0.5 210064 33576 ?        S    00:03   0:00      \_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/plib/DailyMaintainance/task-scrip
t.php ExecuteStatistics --period=daily
root     10240  0.0  0.5 215336 37716 ?        S    00:03   0:07          \_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics --no-webstat
root     28059  3.7  1.2 271212 80980 ?        S    02:33   0:09              \_ /usr/bin/sw-engine -c /usr/local/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics --calcula
te-list --domain-ids 2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2384,2385,2386,2387,2388,2389,2391,2392,2393,2394,2395,2396,2397

Cause

Statistics calculation fails because it takes too much time to calculate disk size of some website(s) due to huge amount of website files/subfolders:

# find /var/www/vhosts/example.com/ | wc -l
628269

# find /var/www/vhosts/example.com/ -type d | wc -l
414928

Such behavior is considered as a software issue PPA-2559.

Resolution

The fix is planned to be included in one of the future product updates.

The following measures may help to resolve the issue:

  1. Increase timeouts in the /etc/sw-cp-server/config conguration file on the management node:

    # grep  fastcgi /etc/sw-cp-server/config
    ...
        fastcgi_read_timeout 4800;
        fastcgi_send_timeout 4800;
    

    and restart sw-cp-server:

    # service sw-cp-server restart
    
  2. Try to find the domain with large number of files/directories on the service node:

    # for d in `ls -1 /var/www/vhosts/ | xargs`; do echo $d; find /var/www/vhosts/$d | wc -l; done
    
  3. You can also attach with strace to the statistics_collector process to find a path to a directory taking too much time to calculate disk usage:

    # strace -p 28059
    Process 28059 attached
    lstat("1424914736index.js", {st_mode=S_IFREG|0644, st_size=403, ...}) = 0
    getdents(11, /* 0 entries */, 32768)    = 0
    close(11)                               = 0
    chdir("..")                             = 0
    lstat("bcd95138343c73de517bedc6d75a5969", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    

    here it is seen that the process is working on the directory bcd95138343c73de517bedc6d75a5969, so it's name can be use to find the problematic website.

Note: some plugins for CMS, like WordPress can generate thousands and millions of temporary files/directories due to it's incorrect settings or errors in the code.

Search Words

daily maintenance task fails

statistics_collector hangs

Tasks "Run the daily maintenance script"

e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065 0f0c16f5b0ad439b029f1a4ef76c7eed 33a70544d00d562bbc5b17762c4ed2b3

Email subscription for changes to this article
Save as PDF