Passer au contenu principal

'Unable to allocate memory for pool' error - Base de connaissances / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. Consider upgrading to Deskpro Horizon

'Unable to allocate memory for pool' error

Liste des auteurs

Question:

I've noticed in my Web PHP error log I'm getting a lot of errors like this:


require(): Unable to allocate memory for pool.
My server isn't running any other app, and it has a lot of physical memory available. How can I stop this happening?

What's Happening?

These errors happen when the APC opcode cache is not assigned enough memory. 

APC caches the PHP files into memory, making them much faster to execute. If there is not enough memory assigned to APC, a bug in APC can sometimes cause PHP to crash.

Solution 1 : Increase APC Memory (Easier)

In your php.ini file, you will see an apc.shm_size value which affects how much memory is assigned to APC. You can also check the current value by going to Admin -> Server > PHP Info and then following the link in the 'APC' section.

To avoid the errors, you need to increase the amount of memory. 

For most installations, a value of 256M is enough; however if you have other PHP applications on your server or a very busy helpdesk, you may need more memory than this.

Once you have changed the APC setting, you must restart your webserver.

You can monitor whether all of Deskpro's PHP files are cached by looking at the APC management page in Admin -> Server -> PHP Info. If you see that APC is using up all its memory, you may want to raise it again.

Solution 2 : Upgrade PHP (Best Solution)

APC is no longer in development or supported. Instead, PHP now includes its own cache called OPCache, starting in PHP 5.5. OPCache doesn't crash when it runs out of memory, so upgrading to PHP 5.5 will avoid the problem. Note that we don't yet recommend upgrading to PHP 5.6.

See this article for details of how to configure OPCache.

Utile Peu Utile

49 personnes sur 102 ont trouvé cette page utile

Ajouter un commentaire

Veuillez vous connecter ou vous enregistrer pour soumettre un commentaire.

Besoin d'un rappel de mot de passe?