Warning: Packets out of order. Expected 3 received 2. Packet size=60

Created on 12 June 2022, over 2 years ago
Updated 16 November 2023, over 1 year ago

Problem/Motivation

clicking /node/3211/devel/token
D 9.3.16 php 8.1
Devel 4.1.5

Warning: Packets out of order. Expected 3 received 2. Packet size=60 in Drupal\Core\Database\StatementWrapper->execute() (line 145 of /www/core/lib/Drupal/Core/Database/StatementWrapper.php)

#0 /www/core/includes/bootstrap.inc(346): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /www/core/lib/Drupal/Core/Database/StatementWrapper.php(145): PDOStatement->execute()
#3 /www/core/lib/Drupal/Core/Database/Query/Upsert.php(113): Drupal\Core\Database\StatementWrapper->execute()
#4 /www/core/lib/Drupal/Core/Cache/DatabaseBackend.php(273): Drupal\Core\Database\Query\Upsert->execute()
#5 /www/core/lib/Drupal/Core/Cache/DatabaseBackend.php(193): Drupal\Core\Cache\DatabaseBackend->doSetMultiple()
#6 /www/core/lib/Drupal/Core/Cache/DatabaseBackend.php(181): Drupal\Core\Cache\DatabaseBackend->setMultiple()
#7 /www/modules/contrib/token/src/TreeBuilder.php(151): Drupal\Core\Cache\DatabaseBackend->set()
#8 /www/modules/contrib/token/src/Controller/TokenDevelController.php(88): Drupal\token\TreeBuilder->buildTree()
#9 /www/modules/contrib/token/src/Controller/TokenDevelController.php(58): Drupal\token\Controller\TokenDevelController->renderTokenTree()
#10 [internal function]: Drupal\token\Controller\TokenDevelController->entityTokens()
#11 /www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#12 /www/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#14 /www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#15 /www/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /www/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#17 /www/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#18 /www/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#19 /www/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#20 /www/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#21 /www/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#22 /www/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /www/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle()
#25 /www/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria maxilein

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France florent8

    A quick fix for this issue is to upgrade the `max_allowed_packet` of your mysql.cnf to a higher value. (for me, going from 32M to 64M did the trick)

    Do we know what's causing this issue though ? I'm having the same error after upgradring from Drupal 9.4.6 to 9.5.2. I do not have access to the mysql configuration file on my production environment so I would like to know if there's another way to fix this issue.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇦🇹Austria maxilein

    Upgraded max_allowed_packets now I get (D9.5.2 php 8.1):

    PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/html/core/lib/Drupal/Core/Utility/Token.php on line 401

    Even if I increase it to 180 seconds it ends up blank.
    So I did 360 seconds max execution time. Still

    I watched memory usage with top. There is nothing going crazy.

    I have these other modules connected to tokens enabled:

    Bamboo Twig - Token
    Token Filter
    Tokens in Views Filter Criteria
    Views Extras (Session/Cookie/Token Support)
    Views Tokenized

    Is there a verbose mode for devel tokens?
    Maybe we could see where there are recursions taking place to localize the problem?

  • 🇦🇹Austria maxilein

    I set it to 3600 and it finally ran through...
    The question remains, why for a simple node like article it takes soo long?!

  • 🇦🇹Austria maxilein

    Looking at the list I see it loads a lot of tokens from all kind of nodes ... 435 tokens ...

  • 🇲🇦Morocco redamakhchan

    Facing the same issue only when i want to edit one of my custom content types, it takes too much time to show the edit page (I added more php memory_limit), then it shows this error about MySQL. I don't know why this started happening suddenly (on production), am still inspecting about the issue as temporary fix, as I said I increased memory_limit on php.ini, and max_allowed_packet on my.cnf.

  • 🇦🇹Austria maxilein

    On D10.1 with the latest token module the error moves to another line.

    PHP Fatal error: Maximum execution time of 60 seconds exceeded in /var/www/web/core/lib/Drupal/Core/Utility/Token.php on line 408

    Maybe there is a possibility to create large lists of tokens in batches? Just an idea...

Production build 0.71.5 2024