Memory exhausted issue fixed

Stuck at PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted. Don’t worry you are at the right place we are here to resolve your issue.

Why this error occurs?

This error can occur especially when you are updating large libraries or libraries with a lot of dependencies. Composers can be quite a memory hungry.

memory exhaust issue PHP

You can solve it by using the following ways.

  • Restart your pc
  • Clean your trash, recycle bin, and other temp data
  • By increasing your memory limit

Restart your pc

You can simply restart your in most cases the issues have been solved by just restarting the pc.

Clean temp data

Clean your recycle bin or trash. If your issue still not resolved then open your command by pressing windows+r and write recent and press enter delete all the files present under it. Again in your command write temp and clean all your files. You can clean all your cache and temp data using cc cleaner.

By increasing memory limit

To get the current memory_limit value, run:

php -r "echo ini_get('memory_limit').PHP_EOL;"

Try increasing the limit in your php.ini file (ex. /etc/php5/cli/php.ini for Debian-like systems):

; Use -1 for unlimited or define an explicit value like 2G
memory_limit = -1

Or, you can increase the limit with a command-line argument:

php -d memory_limit=-1 composer.phar require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle

To get loaded php.ini files location try:

php --ini

Still, your issue has not been resolved feel free to comment or you can visit composer troubleshooting page.

0 0 vote
Article Rating

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x