I am developing a site in Drupal 8.4.4 in Acquia Dev Desktop 2 in Windows 10 with PHP 7.1.11 .

I would like to update to Drupal 8.5.0-beta1 (rather than waiting for the stable release) to see if it solves this issue.

After installing Drupal 8.5.0-beta1, when I run update.php, I see that there are 11 pending updates:

update.php pending updates

When I click "Apply pending updates", I get a white screen with "Fatal error: Out of memory" errors. I have gradually increased "memory_limit" in C:\Program Files (x86)\DevDesktop\php7_1\php.ini and now, with it set at -1 (unlimited), I have this type of error message:

Fatal error: Out of memory (allocated 828375040) (tried to allocate 4096 bytes) in C:\Users\Nick\Sites\devdesktop\drupal\core\lib\Drupal\Component\Annotation\Plugin\Discovery\AnnotatedClassDiscovery.php on line 129

What can I do next to troubleshoot this?

CommentFileSizeAuthor
update-8pt4pt4-to-8pt5beta1.png35.61 KBNick Hope
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nick Hope created an issue. See original summary.

cilefen’s picture

Title: Cannot update from 8.4.4 to 8.5.0-beta1 » Out of memory during schema update from 8.4.4 to 8.5.0-beta1
Category: Support request » Bug report
Priority: Normal » Major
Issue tags: +Windows
cilefen’s picture

This could be related to #1596472: Replace hard coded static cache of entities with cache backends but I’m just guessing based on the data given.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

> I would like to update to Drupal 8.5.0-beta1 (rather than waiting for the stable release) to see if it solves this issue.

It makes sense of course to do that on a test site, but I've seen a bunch of people updating to 8.5.0 alpha on their production site and then ended up with bugs that broke their site. So just saying, be careful.

Updates, especially resaving all config/views does need a large amount of memory, I'v seen a few times already that for example 256MB was not enough but I've never needed more than 512MB, also on very large sites.

So either you have even more views than my sites, something else might be the problem. Also strange that it happens during annotation discovery.

Are you sure that you edited the right php.ini? Check admin/reports/status/php.

Can you enable xdebug, make sure that you get a full stacktrace in case of a fatal error and report that? Maybe you have some kind of loop that will eventually die on memory. xdebug will actually also change that and report a recursion fatal error.

Does this happen always? E.g. on drush, you end up doing multiple cache clears in a row and I've seen that being too much, so a second run might then go through.

Nick Hope’s picture

Thank you for the replies. I will get back to you with the information as soon as possible. Unfortunately for the time being I have lost access to my development site.

Nick Hope’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have now successfully managed to update to 8.5.0-beta1 and do a clean database update.php using 1024M memory, and since then things seem to be working OK.

I did have a lot of unused Views and modules, so I cleared as many of them out as I could. That may have helped.

I also had errors related to Media Entity Flickr, as shown below, so I updated from 8.x-1.1 to 8.x-4.0-alpha4, and the message didn't return.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /update.php/start?id=142&op=do_nojs&op=do
StatusText: OK
ResponseText: 
( ! ) Fatal error: Trait 'Drupal\media_entity\EmbedCodeValueTrait' not found in C:\Users\Nick\Sites\devdesktop\drupal\modules\contrib\media_entity_flickr\src\Plugin\Field\FieldFormatter\FlickrEmbedFormatter.php on line 22
Call Stack
#TimeMemoryFunctionLocation
10.0001362680{main}(  )...\update.php:0
20.0036402888Drupal\Core\Update\UpdateKernel->handle(  )...\update.php:28
31.85397825768Drupal\Core\Update\UpdateKernel->handleRaw(  )...\UpdateKernel.php:73
41.87338082432call_user_func_array:{C:\Users\Nick\Sites\devdesktop\drupal\core\lib\Drupal\Core\Update\UpdateKernel.php:110}
(  )...\UpdateKernel.php:110
51.87338082736Drupal\system\Controller\DbUpdateController->handle(  )...\UpdateKernel.php:110
62.09369185736_batch_page(  )...\DbUpdateController.php:186
72.09489208696_batch_do(  )...\batch.inc:93
82.09489208696_batch_process(  )...\batch.inc:137
92.09679217432update_invoke_post_update(  )...\batch.inc:294
102.09689217480views_post_update_bulk_field_moved(  )...\update.inc:241
112.110912003816array_walk
(  )...\views.post_update.php:273
122.848223469608{closure:C:\Users\Nick\Sites\devdesktop\drupal\core\modules\views\views.post_update.php:267-273}(  )...\views.post_update.php:273
132.848223469608Drupal\views\Entity\View->calculateDependencies(  )...\views.post_update.php:269
142.849623535040Drupal\views\Entity\View->calculatePluginDependencies(  )...\View.php:281
152.849723535040Drupal\views\Plugin\views\display\DefaultDisplay->calculateDependencies(  )...\PluginDependencyTrait.php:47
162.857523627520array_walk
(  )...\DisplayPluginBase.php:960
172.861723654456Drupal\views\Plugin\views\display\DefaultDisplay->calculatePluginDependencies(  )...\DisplayPluginBase.php:960
182.861723654456Drupal\views\Plugin\views\field\EntityField->calculateDependencies(  )...\PluginDependencyTrait.php:47
192.861723655256Drupal\views\Plugin\views\field\EntityField->getFormatterInstance(  )...\EntityField.php:1006
202.861723655232Drupal\Core\Field\FormatterPluginManager->getDefaultSettings(  )...\EntityField.php:975
212.861723655232Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass(  )...\FormatterPluginManager.php:204
222.861723655552class_exists
(  )...\DefaultFactory.php:96
232.861723655648spl_autoload_call
(  )...\DefaultFactory.php:96
242.861723655744Composer\Autoload\ClassLoader->loadClass(  )...\DefaultFactory.php:96
252.861923655904Composer\Autoload\includeFile(  )...\ClassLoader.php:322
262.862123656424include( 'C:\Users\Nick\Sites\devdesktop\drupal\modules\contrib\media_entity_flickr\src\Plugin\Field\FieldFormatter\FlickrEmbedFormatter.php' )...\ClassLoader.php:444
cilefen’s picture

I’m glad to hear it!

Nick Hope’s picture

Status: Fixed » Closed (fixed)