Unable to unistall Prestashop: Allowed memory size of bytes exhausted

Created:

2016-12-12 03:43:49 UTC

Modified:

2017-08-16 17:39:37 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to unistall Prestashop: Allowed memory size of bytes exhausted

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to uninstall Prestashop, the following error is shown in Plesk:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 118227175 bytes) in /usr/local/psa/admin/plib/Service/Agent/Transport/Util.php on line 216

Increasing value in /usr/local/psa/admin/conf/php.ini did not help.

Cause

The cause is not determined yet.

Resolution

  1. Make sure that there are no any hanged sappmng processes. Kill them manually if any:

    # ps auxxffww 
    ...
    10005 40216 0.0 0.1 39304 3288 ? S 18:47 0:00 \\_ /usr/local/psa/admin/bin/sappmng --run-application-script --script-file-name=configure --script-name=remove --script-language=php --user-name=panel-org --application-full-name=file:////usr/local/psa/var/apspackages/apscatalogwSQ2G3.zipa114e249-fcbe-44/cache
    10005 40217 68.1 0.6 216252 13388 ? R 18:47 0:06 \\_ /usr/local/psa/bin/php-cli -d variables_order=EGPCS -d safe_mode=0 -d open_basedir= /usr/local/psa/var/apspackages/apscatalogwSQ2G3.zipa114e249-fcbe-44/cache/scripts/configure remove

    # kill -9 $PGID

    Where $PGID is process id of sappmng , in this example, it is 40216 .

  2. Run the removal operation again.

  3. Check running processes using :

    # ps auxxffww
  4. Find sappmng with his child process php-cli .

  5. Determine the process id of php-cli .
  6. Download strace Linux utility:

    # yum install strace
  7. Using strace determine what happening in the backend of php-cli :

    # strace -p $PID_of_php-cli
  8. If output is the following:

    unlink("/var/www/vhosts/example.com/httpdocs/shop/cache/smarty/compile/f3//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ...

    = -1 ENAMETOOLONG (File name too long)
  9. Move upper directory from strace output to another directory:

    # mv /var/www/vhosts/example.com/httpdocs/shop/cache/smarty/compile/ /root/backups/compile
  10. Manually kill sappmng process.

  11. Start the removal in Plesk again.
Have more questions? Submit a request
Please sign in to leave a comment.