• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

[report] Plesk 10.4.4 statistics are never updated

ps aux | grep "cron"
root 7810 0.0 0.1 23848 1060 ? Ss Feb06 0:00 /usr/sbin/cron
root 26328 0.0 0.0 8968 864 pts/0 S+ 10:54 0:00 grep cron

In /etc/crontab :

# m h dom mon dow user command
3 * * * * root cd / && run-parts --report /etc/cron.hourly
6 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
35 1 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
16 5 11 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#

/usr/sbin/anacron file owner is root with permissions 755

/etc/anacrontab content:

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# These replace cron's entries
1 5 cron.daily nice run-parts --report /etc/cron.daily
7 10 cron.weekly nice run-parts --report /etc/cron.weekly
@monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly
 
I had also problems with the statistics not updating

i did this:

mv /usr/local/psa/etc/logrotate.d/tomcat /root/logrotate_backup

and rebooted the server

after that it looks fine
 
Stats

Thanks for the update.
I will check and shall update this post.
 
Plesk is up-to-date

Please install MU#5 http://kb.parallels.com/en/112937 where this issue was fixed.

I upgraded from 10.1.1 to 10.4.4 a few days ago.
Patch #18 is installed.

<product id="plesk" version="10.4.4" installed-at="20120219T154331">
<patch version="18" timestamp="" installed-at="20120219T154535" />
</product>

But I still cannot set the hosting type in a service plan.


Regards,
Harry
 
Parallels Plesk Panel 10.x for Linux, 10.4.4 Update #19, Centos 6, x86_64

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
- The statistics not update daily.
- manually /usr/local/psa/admin/bin/statistics --calculate-all not works. waits long time then mysql server down.( i guess timeout)

- when i use --calculate-one -d parameter it updates but the statistics starts with that day and traffic is not calculated correctly.

ACTUAL RESULT
nothing updated daily

EXPECTED RESULT
daily update disk space and traffic.
 
Oddly, I'm being hit with this problem on a fresh install (MU23), with data migrated from another server.

Parallels Plesk Panel 10.x for Linux, 10.4.4 Update #23, Centos 6, x86_64

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
- Web statistics *and disk usage* not being updated automatically.
- Install 10.4.4 > check for updates > MU23 and all previous MUs installed > Migrate data from server running 8.6 > wait 24, 48 hours: No disk stats, no web stats.

NOTES:

/usr/local/psa/admin/sbin/statistics --calculate-one -domain-name=domain.tld works correctly and generates web usage stats and disk usage stats for domain.tld

/usr/local/psa/admin/sbin/statistics --calculate-one works correctly and generates web usage stats and disk usage stats for all domains.

** Unsupported Repo used: We have installed php 5.3.10 and MySQL 5.5 from ART repo. Also installed is ASL. But no errors in any logs relating to stats generation or control panel are seen.

** Unsupported Repo used: Repoforge repo is enabled for additional utilities such as multitail


ACTUAL RESULT
Disk and web stats not updated daily

EXPECTED RESULT
Disk and web stats updated daily
 
What about Daily Maintenance script /etc/cron.daily/50plesk-daily with corresponding content

# install_statistics
/opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1

? Does it started by cron? Did you try to run this command (psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1) manually?
 
(this post isn't really relevant. The cause is that nothing in cron.daily is being run at all in Centos 6 under Virtuozzo/OpenVZ template. Please see next post)

This is very interesting:

crond definitely running

/etc/cron.daily/50plesk-daily exists (root.root/-rwxr-xr-w) and contains

Code:
#!/bin/sh

# install_statistics
/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1

# install_mysqldump
/usr/local/psa/bin/mysqldump.sh >/dev/null 2>&1

As root, Manually running /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php gives no errors and does update web-stats.

It also correctly updates disk stats

*** BUG?: After the script updates web-stats, it then goes on to run spamtrain / sa-learn. But I do not have psa-spamassassin installed. I do have spamassassin, but I have not installed the psa-specific functions via the installer. This wastes huge amounts of CPU for no good reason.

NOTE:

/etc/cron.daily also contains a file called awstats:

Code:
#!/bin/sh

/usr/share/awstats/awstats_updateall.pl now -awstatsprog=/var/www/cgi-bin/awstats/awstats.pl -configdir=/etc/awstats >/dev/null 2>&1

exit 0

Also
No mysql dumps (except pre-upgrade) are in /var/lib/psa/dumps -- I was expecting the other part of the plesk cron job to do that every day?

Conclusion: 50plesk-daily not actually being run by crond?

I have added an "echo Plesk script ran OK" to 50plesk-daily to see if this gets run at all daily.
 
Last edited:
OK. I have found the problem and the solution:

With reference to http://forum.openvz.org/index.php?t=msg&goto=44839&#msg_44839

In EL6, /etc/cron.hourly/0anacron is what triggers anacron (cronie-anacron), which is what actually causes daily cron jobs to run ( as defined in /etc/anacrontab )

Anyway, in the openvz forum post above, it points to a permissions issue in 0anacron.

And indeed, in he Virtuozzo Centos 6 template, 0anacron has the same (incorrect) permissions as referenced in that openvz post.

Code:
# ls -al /etc/cron.hourly/
total 20
drwxr-xr-x  2 root root 4096 Mar 21 17:29 .
drwxr-xr-x 85 root root 4096 Mar 26 13:58 ..
-rw-r--r--  1 root root  424 Dec 14 21:22 0anacron
-rwxr-xr-x  1 root root  630 Mar 19 18:35 asl
-rwxr-xr-x  1 root root  695 Mar  1  2010 freshclam

I'm surprised there's no error logged anywhere regarding this.

Because of this permission error, NOTHING in cron.daily gets run.

To fix it, just chmod 755 /etc/cron.hourly/0anacron

So if nothing in cron.daily (and therefore 50plesk-daily) does not appear to be running and you are running Centos 6 (or Scientific Linux 6) on Virtuozzo or OpenVZ via the appropriate OS template then it isn't a Plesk error - it is an error in the template. Just fix it as above.

Note to Igor - the spamtrain bug is still worth looking into please?: After the statistics script updates web-stats, it then goes on to run spamtrain (sa-learn) even if you do not have psa-spamassassin installed. This wastes huge amounts of CPU for no good reason.
 
Last edited:
As far as I remember there were some optimizations for spamtraining procedure in MU#7...
 
As far as I remember there were some optimizations for spamtraining procedure in MU#7...

But why would they be active if psa-spamassassin is not installed? It doesn't seem like the correct behaviour.

Or, if I have misunderstood you, we have MU23 in this system, so if this was a bug corrected in MU7 then it doesn't appear to be corrected under EL6 64bit :)
 
statistic not calculated

back to the important topic :)


---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Plesk 10.4.4 Update #25, 64 Bit Linux

/usr/local/psa/version:
10.4.4 Debian 6.0 1013111102.18

PROBLEM DESCRIPTION
statistics are not (maybe have been never) calculated since fresh one-click install at february this year

STEPS TO REPRODUCE
/usr/local/psa/admin/sbin/statistics -d XXX

results in "MySQL query failed: MySQL server has gone away" after a long time

ACTUAL RESULT
statistics are not calculated (0 byte traffic and webspace)

EXPECTED RESULT

ANY ADDITIONAL INFORMATION
ps fax shows that the statistics script executed awstats for every domain?

\_ /usr/bin/sw-engine -c /opt/psa/admin/conf/php.ini /usr/local/psa/admin/sbin/statistics -d XXX
\_ sh -c '/opt/psa/admin/bin/statistics_collector'
\_ /opt/psa/admin/bin/statistics_collector
\_ sh -c /usr/share/awstats/tools/awstats_buildstaticpages.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/opt/psa/etc/awstats -config=ANOTHERXXX-anon_ftp -dir=/var/www/vhosts/ANOTHERXXX/statistics/anon_ftpstat/current
\_ /usr/bin/perl /usr/share/awstats/tools/awstats_buildstaticpages.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl -configdir=/opt/psa/etc/awstats -config=ANOTHERXXX-anon_ftp -dir=/var/www/vhosts/ANOTHERXXX/statistics/anon_ftpstat/current
\_ sh -c "/usr/lib/cgi-bin/awstats.pl" -config=ANOTHERXXX-anon_ftp -staticlinks -configdir=/opt/psa/etc/awstats -output=allhosts 2>&1


--------------------------------------------------------------
 
results in "MySQL query failed: MySQL server has gone away" after a long time

Looks like MySQL timeout. Did you try to increase wait_timeout in /etc/my.cnf:

wait_timeout 20000

and restart MySQL after that?
 
sorry for the late reply , but thank you! this works..
he set the timouts to very low and high max connections before ..
 
Back
Top