• 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.

Resolved HUGE GBs LOGS FILES

LwStudio

New Pleskian
I got these 2 issue:

1. A domain has 12.7GB of logs as: Nginx Error - logs/proxy_error_log
The rotate seems to not work with this file, and from the Logs Dashboard of the domain is not allowed to delete it.
Is it safe manually delete it from SSH? Or...other solution?

2. A got 30.2GB of logs in this file: /var/log/plesk-php74-fpm/error.log
Also for this log the rotate does not seem to work.
Is it safe manually delete it from SSH? Or...other solution?

I try, with no success, to follow this article, entering a daily rotation

SERVER:
Centos8 64bit - VPS - OBSIDIAN 18.0.35

Many thanks for some support.
 

Attachments

  • SCREEN_PLESK.png
    SCREEN_PLESK.png
    188.5 KB · Views: 19
It is safe to manually delete log files, however, you need to restart the corresponding service afterwards, because running services might have open file handles in RAM to the log file destination, so new entries cannot be written, if the file is suddenly missing from disk.
 
You may also want to check the contents of those error logs to see what causes such a huge amount of errors. Most of the time it's bad PHP code that spits out errors in a loop (for example, PHP code that tries to read a file in a while-loop without checking if that file really exists).

In case you see the same error repeated over and over again in your error logs you may want to consider setting ignore_repeated_errors = On in your php.ini for this domain (or your service plan or server-wide)
 
It is safe to manually delete log files, however, you need to restart the corresponding service afterwards, because running services might have open file handles in RAM to the log file destination, so new entries cannot be written, if the file is suddenly missing from disk.
Ok, many thanks Peter. Do you mind give the command to restart the service for this file /var/log/plesk-php74-fpm/error.log

Or you mean an engine services restart as:
Code:
# service sw-engine restart && service sw-cp-server restart
 
Last edited:
You may also want to check the contents of those error logs to see what causes such a huge amount of errors. Most of the time it's bad PHP code that spits out errors in a loop (for example, PHP code that tries to read a file in a while-loop without checking if that file really exists).

In case you see the same error repeated over and over again in your error logs you may want to consider setting ignore_repeated_errors = On in your php.ini for this domain (or your service plan or server-wide)
Ok Monty thanks for the tip. It's something I wanted to do but I was afraid to open a 30GB file had never happened to me in the past ... maybe I download it locally and open it to see if there's some loop.
 
Ok Monty thanks for the tip. It's something I wanted to do but I was afraid to open a 30GB file had never happened to me in the past ... maybe I download it locally and open it to see if there's some loop.

You can open it directly on the server using a file viewer (not editor!) such as "less". Saves you a lot of downloading ;)
 
Back
Top