Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Server with Plesk runs out of the space because of PHP-FPM logs

 
2021croncrontabdomainshttps

Symptoms

PHP-FPM logs (/var/log/plesk-phpXX-fpm/error_log) get huge size and are not rotated so the server might run out of space

Cause

Product issue:

  • #PPPM-11362 "Plesk now daily rotates PHP-FPM error logs to prevent them from consuming all the server disk space and eventually causing issues on the server."
    Fixed in:

    • Plesk Obsidian 08 June 2021 (Linux)

Note: Currently, /var/log/plesk-phpXX-fpm/error_log is shared and all domains write errors to it. As a result it is not included into any domain disk space statistics
As well as currently Plesk configured to rotate this log file on daily basis.

Resolution

Please consider updating your server:

  • How to install Plesk updates

Workaround

As a workaround, an additional log rotation by size for a PHP-FPM error log can be configured using native OS utilities, for example, the logrotate.
For more details refer to the logrotate documentation: https://linux.die.net/man/8/logrotate

Configuration example

The logrotate configuration file for PHP-FPM services is located in /etc/logrotate.d/ directory:

# ls -l /etc/logrotate.d/*php*
-rw-r--r-- 1 root root 203 Nov 15 23:36 /etc/logrotate.d/php-fpm
-rw-r--r-- 1 root root 211 Jan 9 13:25 /etc/logrotate.d/plesk-php56
-rw-r--r-- 1 root root 211 Jan 9 12:46 /etc/logrotate.d/plesk-php70
-rw-r--r-- 1 root root 211 Jan 9 11:11 /etc/logrotate.d/plesk-php71
-rw-r--r-- 1 root root 211 Jan 9 14:50 /etc/logrotate.d/plesk-php72

  1. Connect to the server via SSH

  2. Modify the corresponding file for required php-fpm service in an appropriate way
    For example, for the system PHP-FPM /etc/logrotate.d/php-fpm, file will look like the following:

    /var/log/php-fpm/*log {
    rotate 14
    daily
    missingok
    notifempty
    size 100M
    compress
    missingok
    notifempty
    sharedscripts
    delaycompress
    postrotate
    /bin/kill -SIGUSR1 cat /run/php-fpm/php-fpm.pid 2>/dev/null 2>/dev/null || true
    endscript
    }

    Note: parameters rotate (specified in days), size and daily (or monthly, weekly) can be changed to meet the requirements.

    If it is required to rotate log files more often, then remove parameter daily from the config above and create a cron task.
    For example, the following will run logrotate every 5 hours:

    # crontab -e
    01 01,06,11,16,21 * * * /usr/sbin/logrotate /etc/logrotate.d/php-fpm -s /var/lib/logrotate/logrotate.status

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Cron Jobs: All You Need To Know

Read More »

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »
Knowledge Base

[BUG] Unable to start or restart Apache after uninstalling Roundcube in Plesk: Could not open configuration file roundcube.htaccess.inc No such file or directory

Read More »

[BUG] nginx shows configuration error in Plesk: “proxy_read_timeout” directive is duplicate

Read More »

Domain shows 403 error after using Move Domain feature: Forbidden You don’t have permission to access / on this server.

Read More »

Mail accounts cannot log into Plesk web interface if password is encrypted

Read More »

Hosting Wiki

  • Cross Site Request Forgery (CSRF)
  • Cross-Origin Resource Sharing (CORS)
  • Server Redundancy
  • Postfix
  • Linux Containers
  • PostgreSQL
  • DDoS
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Domain
  • Hosting Control Panel
  • Plesk
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
  • Cron Jobs
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
  • HTTP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family