• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Daily Maintenance Script failing - debug attached

TimMcTPC

Basic Pleskian
Hello,

We have a Plesk 11.0.9 MU #56 server with 3663 subscriptions, although most are simple domains with no services, just DNS.
Statistics weren't updating for customers with hosting, so I added commands to send output info from the daily maintenance file to a log, here is the contents:

Code:
+ export PLESK_DEBUG_LEVEL=4
+ PLESK_DEBUG_LEVEL=4
+ /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 Starting: Daily Maintainance
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 == Begin Check for updates
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 Last updates or upgrades check has been made at 2013-08-14T04:03:27+01:00
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 == End Check for updates
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 == Begin Installation of updates
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 == End Installation of updates
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 == Begin Update keys
[Fri, 16 Aug 2013 04:03:03 +0100] > 0 updating scheduled keys
[Fri, 16 Aug 2013 04:03:04 +0100] > 0 update resultCode=2 resultDesc=Key update disabled
[Fri, 16 Aug 2013 04:03:04 +0100] > 0 == End Update keys
[Fri, 16 Aug 2013 04:03:04 +0100] > 0 == Begin Collect Plesk usage statistics
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == End Collect Plesk usage statistics
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == Begin Process autoreports
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == End Process autoreports
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == Begin Sitebuilder management
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == End Sitebuilder management
[Fri, 16 Aug 2013 04:03:09 +0100] > 0 == Begin Mail boxes usage
[Fri, 16 Aug 2013 04:03:14 +0100] > 0 == End Mail boxes usage
[Fri, 16 Aug 2013 04:03:14 +0100] > 0 == Begin Execute statistics backend
[Fri, 16 Aug 2013 05:22:51 +0100] > 0 == End Execute statistics backend
[Fri, 16 Aug 2013 05:22:51 +0100] > 0 == Begin Optimize statistics
[Fri, 16 Aug 2013 05:22:51 +0100] > 0 Calc client traffic.
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 Remove expired client traffic.
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 Collapse domain traffic.
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 Collapse client traffic.
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 == End Optimize statistics
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 == Begin Analyse domain statistics
[Fri, 16 Aug 2013 05:22:52 +0100] > 0 processing domains
[Fri, 16 Aug 2013 05:22:52 +0100] o 0 domain1.com
[Fri, 16 Aug 2013 05:22:52 +0100] o 0 domain2.com
[Fri, 16 Aug 2013 05:22:52 +0100] o 0 domain3.com
[Fri, 16 Aug 2013 05:22:52 +0100] o 0 domain4.com

The pattern of domains is repeated for a good while until:

Code:
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /usr/local/psa/admin/plib/Limits/DomainLimitsManager.php on line 686

This issue occurs daily and appears at around the same point each time. Can you give me any recommendations on how to best fix this issue, please?

Regards
 
Code:
[root@p ~]# php -i | grep memory
PHP Deprecated:  Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
memory_limit => 128M => 128M
 
Try to increase memory limit on your server

yes, of course, but 128MB is quite a large limit anyway. prevention is better than cure - can this script be fixed to release memory rather than consuming more and more during running?
 
Further looking at this, the limit is 256MB, thus the panel isn't using the limit defined in your command above. Anyone else have any ideas?
 
Back
Top