Module incompatible with Bigpipe

Created on 27 June 2023, over 1 year ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

The module does not work as advertised if big_pipe module is enabled. This is due to the fact that bigpipe sets the max-age cachability paramter to 0 ($html_response->getCacheableMetadata()->setCacheMaxAge(0)). This prevents varnish from caching pages for logged in users.

Proposed resolution

  • This was not fixed in #3211614: Add support for BigPipe . (The changes in this issue made it a lot harder to understand the symptoms since it removed the requirements from the status page!)
  • The requirements should be clearly documented.
🐛 Bug report
Status

Active

Version

4.0

Component

Documentation

Created by

🇸🇪Sweden meanderix

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

Comments & Activities

  • Issue created by @meanderix
  • 🇫🇮Finland sokru

    I noticed the following error on php logs each time a user tried to log in.

    RuntimeException: Failed to start the session because headers have already been sent by "/var/www/html/vendor/symfony/http-foundation/Response.php" at line 426. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 132 of /var/www/html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)
    #0 /var/www/html/web/core/lib/Drupal/Core/Session/SessionManager.php(144): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
    #1 /var/www/html/web/core/lib/Drupal/Core/Session/SessionManager.php(109): Drupal\Core\Session\SessionManager->startNow()
    #2 /var/www/html/vendor/symfony/http-foundation/Session/Session.php(59): Drupal\Core\Session\SessionManager->start()
    #3 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(240): Symfony\Component\HttpFoundation\Session\Session->start()
    #4 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(295): Drupal\big_pipe\Render\BigPipe->performPreSendTasks()
    #5 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipeResponse.php(112): Drupal\big_pipe\Render\BigPipe->sendContent(Object(Drupal\big_pipe\Render\BigPipeResponse))
    #6 /var/www/html/vendor/symfony/http-foundation/Response.php(423): Drupal\big_pipe\Render\BigPipeResponse->sendContent()
    #7 /var/www/html/web/index.php(20): Symfony\Component\HttpFoundation\Response->send()
    #8 {main}
    

    I would say its due to Drupal core 9.2 changes that many other modules have faced. Attached a patch that fixes the error, but I still get the X-Cacheable:Cookie in the response header. Not sure if this still requires adjusting the default.vcl template.

Production build 0.71.5 2024