Applicable to:
- Plesk for Windows
Symptoms
-
In Plesk for Windows, going to Domains > example.com > Logs, one of the following issues might appear:
-
A blank page is shown
-
HTTP Error 500 Internal Server Error is shown
-
Some logs are not shown
-
-
With Plesk debug mode enabled, the following or similar error might be found in the log file
%plesk_dir%admin\logs\php_error.log
:CONFIG_TEXT: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 341 bytes) in C:\Program Files (x86)\Plesk\admin\plib\LogBrowser\Parser.php on line 40
-
Size of the log files retained for the domain is too high:
Note: This command will output the size of log files in megabytes.
PS "{0:N2}" -f ((Get-Childitem -Recurse $env:plesk_vhosts\example.com\logs\iis | Measure-Object
-Sum Length | Select Sum).Sum / 1MB )
91762.00
Cause
Plesk Log Parser cannot process log files due to their size. For the better error reporting, a request PPPM-5375 was created.
Resolution
Consider changing the Log rotation settings to minimize the log-files size as much as possible:
-
Connect to the server via RDP
-
Enable log rotation for the affected domain:
-
If only one domain is affected:
PS plesk bin site -u example.com -log-rotate true -log-bysize 10240 -log-compress true
-
If multiple domains are affected:
PS @("example.com", "example.org") | % { &plesk bin site -u $_ -log-rotate true -log-bysize 10240 -log-compress true }
Note: As a result, log files will be rotated and compressed as soon as they reach 10MB size after the Plesk Daily task.
-
Comments
0 comments
Please sign in to leave a comment.