Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

siewlon6093's avatar

Allowed memory size of 1610612736 bytes exhausted ???

can someone help me this?

I running composer require illuminate/support in ssh server but it show

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocat e 4096 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Dependenc yResolver/Solver.php on line 220

0 likes
27 replies
piljac1's avatar

Try prefixing your command with COMPOSER_MEMORY_LIMIT=-1. This will remove the memory limit for the execution of the command.

COMPOSER_MEMORY_LIMIT=-1 composer require illuminate/support
24 likes
piljac1's avatar

Update: Memory exhaust errors should now be resolved by using Composer 2. However, some of your packages might not be compatible with Composer 2, so you will have to be careful and resolve your packages compatibility errors after upgrading to Composer 2.

You can read the upgrade guide here.

siewlon6093's avatar

Illuminate\Foundation\ComposerScripts::postAutoloadDump

Parse error: syntax error, unexpected '=' in /home1/euzlarmy/public_html/21pixar/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 384

what does it mean?? @piljac1

Sinnbeck's avatar

What version of php are you running? Sounds like php 5.6

php -v
siewlon6093's avatar
PHP 7.3.13 (cli) (built: Dec 19 2019 20:13:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.13, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.

@sinnbeck

Sinnbeck's avatar

Weird. The line in question is destructoring. Did you manually edit the file by any chance?

siewlon6093's avatar

no I just run

COMPOSER_MEMORY_LIMIT=-1 composer require illuminate/support

then errors show up

4 likes
Snapey's avatar

So, a project that already includes illuminate/support, you are trying to install it again?

siewlon6093's avatar

The errors bring me to here

Symfony\Component\Debug\Exception\FatalThrowableError
Class 'Illuminate\Support\Facades\Input' not found
http://21pixar.com/panel/admin/images
A composer dependency is missing
You might be missing a composer dependency. A possible package that was found is illuminate/support.

See if this is the package that you need and install it via composer require illuminate/support.

READ MORE
Git repository
Package on Packagist
Snapey's avatar

It could be that you are trying to install a version of illuminate/support that is much newer than your application.

I would delete the entire vendor folder and then run composer install

piljac1's avatar

Can you outputting phpinfo() on your server and see if it is really using PHP 7.3 ? There might be a mismatch with the CLI. If that's the case and the actually used PHP version is below the requirements based on your Laravel version, that will cause the error you encountered.

sarahman's avatar

Thanks! Your answer resolves my composer memory related issue.

COMPOSER_MEMORY_LIMIT=-1 composer require <package-name>

4 likes
stuartcusack's avatar

Some clues....

If I try to run composer require league/flysystem-aws-s3-v3 ~1.0

I get the Memory Exhausted error.

But if I add the requirement to my composer.json manually, ie: "league/flysystem-aws-s3-v3": "~1.0",

and then run composer update

Everything works fine. Odd.

2 likes
ssbrar's avatar

Thanks, this works for me. I'd be grateful to you if you could please expalain why this error occured at all?

redbayoub's avatar

Hi, @stuartcusack

Despite that this works but you should never run composer update on production server because it may break your app

Yesaya's avatar

COMPOSER_MEMORY_LIMIT=-1 composer require laravel/socialite

It worked for me thanks.

1 like
sumon4skf's avatar

Also works for me... php7.3.12 and Laravel 6.19.1

COMPOSER_MEMORY_LIMIT=-1 composer require intervention/image

aullah's avatar

I've never had this issue before. COMPOSER_MEMORY_LIMIT=-1 didn't solve the issue either.

I did get a notice that Composer 2 is available; after updating the issue no longer persists. 😊

jmuchiri's avatar

For LOCAL development,

Use php --ini to find your php ini file

Find memory_limit and set it to -1

1 like

Please or to participate in this conversation.