Answers.Body: <p>This ended up being a bug in Craft that was fixed in <a href="https://github.com/craftcms/cms/commit/df40f585cef3d7e47f811f73b08d9d71bbc9c9b2" rel="nofollow noreferrer">https://github.com/craftcms/cms/commit/df40f585cef3d7e47f811f73b08d9d71bbc9c9b2</a> and will be included in the next (3.3.14) release.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-31T03:25:15.907Z
Answers.Text: "Update complete!" Not seen that in a while! Worked at least in the case of plugins. Will wait and see for the next Craft release. Thanks Brad
Answers.UserDisplayName: neekster
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-28T19:40:36.930Z
Answers.LastActivityDate: 2019-10-28T19:40:36.930Z
Answers.UserDisplayName: Brad Bell
Body: <p>This one has been bugging me for months. </p>
  
  <p>My development environment is running on MAMP on OS X. It's worked absolutely find for ages but for no reason that I can identify all my Craft sites now throw the following error when trying to apply updates via the craft cli:</p>
  
  <pre><code>./craft update craft
  
  [snip]
  
  Performing update with Composer ... PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes)'
  
  </code></pre>
  
  <p>Doesn't matter how much memory I give php, it will always eat it all up, exmaple of silly about of memory:</p>
  
  <pre><code>php -i | grep memory
  memory_limit =&gt; 2048M =&gt; 2048
  </code></pre>
  
  <p>It will run for a good 2-3 minutes before throwing the error.</p>
  
  <p>I assumed there was something odd with my local environment so held on as I was reloading the mac, but the issue has followed me to a fresh install.</p>
  
  <p>I did notices the number of bytes it refers too is ~1.6GB, this figure doesn't change with php cli's memory limit, for example if I drop the limit to 512MB I get the same allowed memory size figure, which suggests to me there is another php binary in play here, but I don't know enough about how the craft cli works to troubleshoot that.</p>
  
  <p>When this happens, in most cases I can complete the update using composer, but it's a hack that I don't want to continue with.  </p>
  
  <p>Versions are as follows:</p>
  
  <p>Craft: All 3.1 and above, possibly 3.0 too but can't confirm
  Mamp: 5.51
  php cli: 7.2.21
  Composer: 1.9.0
  OS X: 10.14</p>
  
  <p>Any ideas on how to troubleshoot this further?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-25T18:15:33.703Z
Comments.Text: huh... weird.  the only thing I can think of would be to hook xDebug up to the CLI and step through the code to see what's going on... maybe some infinite loop? We haven't heard of any other issues like this, though.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-26T02:01:53.100Z
Comments.Text: Weird for sure. My setup is so vanilla it's not funny so I couldn't understand why nobody else was reporting this. I'll try xDebug, it's way out my comfort zone but will see if I can get somewhere
Comments.UserDisplayName: neekster
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-03T19:50:35.810Z
Comments.Text: I'm suddenly having exactly the same issue.
Comments.UserDisplayName: artmem
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-05T04:57:14.640Z
Comments.Text: I tried debugging it but didn't really get anywhere. I'm all out of ideas
Comments.UserDisplayName: neekster
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-13T12:13:34.440Z
Comments.Text: I am having the same issue too. And I have not found a solution yet.
  
  I `ctrl-c` on `Performing update with Composer` and initiate `composer update` manually.
Comments.UserDisplayName: Dennis Frank
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-23T09:23:34.110Z
Comments.Text: Did anyone solve this issue? I am getting this error a lot on different servers recently.
Comments.UserDisplayName: Marcus Scheller
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-24T10:16:50.623Z
Comments.Text: @MarcusScheller I certainly didn't resolve it. Can you perhaps provide some details on the servers that have this issue, would be good if I could demonstrate this issue occuring outside Mamp/OS X.
Comments.UserDisplayName: neekster
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-25T09:41:11.503Z
Comments.Text: @neekster Those are just standard shared hosting, all equipped with recent php versions also on the cli. Nothing special.
Comments.UserDisplayName: Marcus Scheller
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-10-25T14:07:07.457Z
Comments.Text: I am getting exactly the same on my local MAMP set-up.  
  
  
  Performing update with Composer ... PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes)'  
  
  MAMP PRO 5.3  
  PHP 7.3.1  
  OS X 10.14.6  
  Craft 3.0.23.1  
  
  I have been though these steps https://craftcms.com/guides/mamp-with-composer-and-mysql-on-the-command-line  
  
  @BradBell any ideas, it seems we have some more cases.
Comments.UserDisplayName: Tim Print
Tags: <composer><updating><cli>
Title: Allowed memory size of 1610612736 bytes exhausted when updating via CLI on OS X
ThreadText: # Allowed memory size of 1610612736 bytes exhausted when updating via CLI on OS X
  
  (Asked by: username_0 on 2019-09-25)
  
  This one has been bugging me for months.
  
  My development environment is running on MAMP on OS X. It's worked absolutely find for ages but for no reason that I can identify all my Craft sites now throw the following error when trying to apply updates via the craft cli:
  
  ```
  ./craft update craft
  
  [snip]
  
  Performing update with Composer ... PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes)'
  
  ```
  
  Doesn't matter how much memory I give php, it will always eat it all up, exmaple of silly about of memory:
  
  ```
  php -i | grep memory
  memory_limit => 2048M => 2048
  
  ```
  
  It will run for a good 2-3 minutes before throwing the error.
  
  I assumed there was something odd with my local environment so held on as I was reloading the mac, but the issue has followed me to a fresh install.
  
  I did notices the number of bytes it refers too is ~1.6GB, this figure doesn't change with php cli's memory limit, for example if I drop the limit to 512MB I get the same allowed memory size figure, which suggests to me there is another php binary in play here, but I don't know enough about how the craft cli works to troubleshoot that.
  
  When this happens, in most cases I can complete the update using composer, but it's a hack that I don't want to continue with.
  
  Versions are as follows:
  
  Craft: All 3.1 and above, possibly 3.0 too but can't confirm
  Mamp: 5.51
  php cli: 7.2.21
  Composer: 1.9.0
  OS X: 10.14
  
  Any ideas on how to troubleshoot this further?
  
  **Tags:** composer, updating, cli
  
  > **Comments:**
  > **username_1**: huh... weird.  the only thing I can think of would be to hook xDebug up to the CLI and step through the code to see what's going on... maybe some infinite loop? We haven't heard of any other issues like this, though.  
  > **username_0**: Weird for sure. My setup is so vanilla it's not funny so I couldn't understand why nobody else was reporting this. I'll try xDebug, it's way out my comfort zone but will see if I can get somewhere  
  > **username_2**: I'm suddenly having exactly the same issue.  
  > **username_0**: I tried debugging it but didn't really get anywhere. I'm all out of ideas  
  > **username_3**: I am having the same issue too. And I have not found a solution yet.  I `ctrl-c` on `Performing update with Composer` and initiate `composer update` manually.  
  > **username_4**: Did anyone solve this issue? I am getting this error a lot on different servers recently.  
  > **username_0**: @username_4 I certainly didn't resolve it. Can you perhaps provide some details on the servers that have this issue, would be good if I could demonstrate this issue occuring outside Mamp/OS X.  
  > **username_4**: @username_0 Those are just standard shared hosting, all equipped with recent php versions also on the cli. Nothing special.  
  > **username_5**: I am getting exactly the same on my local MAMP set-up.     Performing update with Composer ... PHP Fatal Error 'yii\base\ErrorException' with message 'Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes)'    MAMP PRO 5.3   PHP 7.3.1   OS X 10.14.6   Craft 3.0.23.1    I have been though these steps https://craftcms.com/guides/mamp-with-composer-and-mysql-on-the-command-line    @username_1 any ideas, it seems we have some more cases.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-28. Score: 2 | Accepted answer
  
  This ended up being a bug in Craft that was fixed in <https://github.com/craftcms/cms/commit/df40f585cef3d7e47f811f73b08d9d71bbc9c9b2> and will be included in the next (3.3.14) release.
  
  > **Comments:**
  > **username_0**: "Update complete!" Not seen that in a while! Worked at least in the case of plugins. Will wait and see for the next Craft release. Thanks username_1  
  
  ---
  
  