Operations in Plesk fail: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)

Follow

Comments

11 comments

  • Avatar
    Gianluca

    I had this issue trying to delete a subscription, i followed this guide but it seems the restart of the Plesk management service does not "read" the new php.ini, in fact after the modification i tried again to delete the subscritpion but the error was the same.

    Then i tried to restart Plesk services by "Plesk service monitor": i restarted the entire "Plesk run-time" and "Mail service" then tried to delete the subscription again, no luck.

    Finally i restarted the server and finally i was able to delete the subscription.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Gianluca, which limit have you specified when applying the solution?

    There is a possibility that specified limit was not enough.

    0
    Comment actions Permalink
  • Avatar
    Gianluca

    I have increased the limit from 256M to 512M.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Gianluca, thank you for the provided info.

    If the issue will reoccur, increase the limit further. In case it would not help, consider submitting a ticket to Plesk Technical Support.

    0
    Comment actions Permalink
  • Avatar
    Oleg Burca

    Changes are lost after Plesk upgrade is performed (/usr/local/psa/admin/conf/php.ini is reset to default).

    Please provide a persistent solution.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Oleg Burca

    To prevent the changes from being reverted during Plesk update, replace the following line in /etc/cron.daily/50plesk-daily:

    • For Debian/Ubuntu:

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

      With:

      /usr/local/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1 && sed -i '/memory_limit/c\memory_limit = 512M' /usr/local/psa/admin/conf/php.ini

    • For CentOS:

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

      With:

      /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1 && sed -i '/memory_limit/c\memory_limit = 512M' /usr/local/psa/admin/conf/php.ini

    0
    Comment actions Permalink
  • Avatar
    COMPY

    If Plesk 18.0.32 on Ubuntu use the line "/opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1" still safe to change?

    1
    Comment actions Permalink
  • Avatar
    COMPY

    The error will be showing in Nexcloud app "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 142274016 bytes)"

    0
    Comment actions Permalink
  • Avatar
    COMPY

    Solution to the problem with Nexcloud app. Upgrade MariaDB to 10.2.

     

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman

    Hi @Ivan Postnikov,

    Can you please update the code for latest server and plesk versions?

     

     

     

    Ivan PostnikovMay 31, 2020 13:16

    Hello Oleg Burca

    To prevent the changes from being reverted during Plesk update, replace the following line in /etc/cron.daily/50plesk-daily:

    • For Debian/Ubuntu:

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

      With:

      /usr/local/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1 && sed -i '/memory_limit/c\memory_limit = 512M' /usr/local/psa/admin/conf/php.ini

    • For CentOS:

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

      With:

      /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1 && sed -i '/memory_limit/c\memory_limit = 512M' /usr/local/psa/admin/conf/php.ini

     

    0
    Comment actions Permalink
  • Avatar
    Stefano De Luca

    Hi,

    I followed the instructions
    but on opening, with VI of php.in, I get:
    ; ATTENTION!
    ;
    ; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
    ; SO ALL YOUR CHANGES WILL BE LOST AFTER YOU UPGRADE PLESK.

    the values can be deleted but not modified

    I tried to log in with: nano but the card is empty

    some advice?
    Thank you

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request