Software⏱️ 2 min read📅 2026-05-31

How to Fix: Composer require runs out of memory. PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted

Out of memory error when running composer require due to large bundle dependencies.

Quick Answer: Try increasing the PHP memory limit or using a more lightweight alternative to resolve the issue.

When running the command `composer require hwi/oauth-bundle php-http/guzzle6-adapter php-http/httplug-bundle` you are getting the out of memory error. This happens because Composer is trying to download and install multiple bundles at once, which exceeds the PHP's allowed memory size.

🔍 Why This Happens

  • Composer is trying to download and install multiple bundles at once, which exceeds the PHP's allowed memory size.

🚀 How to Resolve This Issue

Method 1: Use Composer with Memory Limit Increase

  1. Step 1: Run the following command to increase the memory limit in PHP.

Method 2: Use Composer with Parallel Installation

  1. Step 1: Run the following command to enable parallel installation using `--prefer-dist` flag.

💡 Conclusion

By increasing the memory limit or enabling parallel installation, you can resolve the out of memory error when running `composer require` command.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions