composer / getcomposer.org

getcomposer.org sources

Home Page:http://getcomposer.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add note about using x86/36bit php and memory error

garygreen opened this issue · comments

Sorry if this is the wrong place to post this. It's something I've struggled with for a while and after a lot of research I've finally discovered why composer isn't updating and causing this error:

Fatal error: Allowed memory size of XXXXXXXX bytes exhausted

It's because I was using a PHP binary that was x86/36bit and 32 bit processes have a memory limit of 2GB. So despite using memory_limit=-1 would still run into memory issues.

There's quite a number of posts about this on the internet and so I'm sure others would benefit from this being mentioned on the docs. Or even better, if it was detected within composer itself and give a recommendation to upgrade to x64.

Composer 2 should help a lot with memory issues so hopefully this won't be a problem anymore.