I am trying to locally install Craft Typed Link Field from the plugin store and I'm getting this PHP error.

I have already upped my memory_limit to 256M within my php.ini file, yet this is claiming to need 400M to run these updates.

I'd rather try to deal with the root cause instead of upping my memory_limit to 410M.

Trace is following:

A fatal error has occurred:

Status: Internal Server Error

Response: <pre>PHP Fatal Error &#039;yii\base\ErrorException&#039; with message &#039;Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes)&#039;

in /Users/name/project/build/vendor/composer/composer/src/Composer/DependencyResolver/Solver.php:220

Stack trace:
#0 [internal function]: yii\base\ErrorHandler-&gt;handleFatalError()
#1 {main}</pre>
  • Craft shouldn't need any more than 256M... could you send your composer.json, composer.lock file and a database backup over to support@craftcms.com?
    – Brad Bell
    Nov 26 '18 at 16:10
  • Hi @BradBell. I have a suspicion it's a custom plugin that another member of the team is developing. I tried to install the plugin I wanted via the command line and I got a 'RuntimeExeption' error so I think it's to do with that. I'm going to bring it up with him and I'll get back to you!
    – Jay
    Nov 27 '18 at 10:29

This is more of a Composer than a Craft issue. Depending on your project dependencies, Composer could easily need 1GB of memory.

I assume you got the 410M from the 4039 bytes in the error. That's only what Composer can't allocate for what it's doing, you might need more later in the process.

I would start by upping my memory_limit to 512M and see where it gets you.

  • I upped it to 512M and got the problem resolved for now, but I'd like to keep it at the 256M that Craft 3 requires if I can.
    – Jay
    Nov 27 '18 at 10:31

This issue was due to the version of the custom plugin I installed on project setup was broken. Since then, it's been updated and fixed so when I removed my vendors directory and installed all the packages, this issue appears to have been resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.