<p>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.</p>

CC BY-SA 4.0
2018-12-14T12:32:50.900Z
2018-12-14T12:32:50.900Z
Jay
<p>This is more of a Composer than a Craft issue. Depending on your project dependencies, Composer could easily need 1GB of memory.</p>

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

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

CC BY-SA 4.0
2018-11-27T10:31:00.197Z
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
CC BY-SA 4.0
2018-11-26T10:27:34.817Z
2018-11-26T10:27:34.817Z
Paul
<p>I am trying to locally install Craft Typed Link Field from the plugin store and I'm getting this PHP error.</p>

<p>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.</p>

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

<p>Trace is following:</p>

<pre><code>A fatal error has occurred:

Status: Internal Server Error

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

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

Stack trace:
#0 [internal function]: yii\base\ErrorHandler-&amp;gt;handleFatalError()
#1 {main}&lt;/pre&gt;
</code></pre>

CC BY-SA 4.0
2018-11-26T16:10:31.217Z
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
CC BY-SA 4.0
2018-11-27T10:29:47.167Z
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
<php><updates><composer>
Getting fatal error when installing new plugin by hitting memory_limit
# Getting fatal error when installing new plugin by hitting memory_limit

(Asked by: username_0 on 2018-11-26)

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: PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 268435456 bytes exhausted (tried to allocate 4096 bytes)'

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

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

**Tags:** php, updates, composer

> **Comments:**
> **username_1**: 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?  
> **username_0**: 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!  

---

## 2 answers

### Answer by username_0 on 2018-12-14. Score: 1 | Accepted answer

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.


---

### Answer by username_2 on 2018-11-26. Score: 1

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.

> **Comments:**
> **username_0**: 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.  

---

