At the weekend we updated one of our D8 sites from 8.6.5 to 8.6.9. It had gone through basic local testing and deployment to dev and stage without showing any issues but when deployed to production we started seeing an intermittent issue where the site would lose all the themeing roughly every 45 minutes or so. A cache clear would immediately fix this but then, 45 minutes later it would break again.
I'm afriad I don't know why this was happening but we did try a few things and make a few observations. Firstly here's the top of the HTML output for our homepage when it's working:
<!DOCTYPE html>
<html lang="en" dir="ltr" prefix="content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# schema: http://schema.org/ sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema# ">
<head>
<meta charset="utf-8" />
<meta name="Generator" content="Drupal 8 (https://www.drupal.org)" />
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="/themes/scambs_intra/favicon.ico" type="image/vnd.microsoft.icon" />
<title>Home | Mysite</title>
<link rel="stylesheet" href="/sites/default/files/css/css_WkWOonf7g_MdL8iKvcK9XQPkWQY78cRHweLIGzF-I8w.css?pn63js" media="all" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.0/dist/css/bootstrap.min.css" media="all" />
<link rel="stylesheet" href="/sites/default/files/css/css_1e_Ia0XpzwjwH3tOHb41YRkW7I4_S9bcp5xM085tyYU.css?pn63js" media="all" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Oswald" media="all" />
<link rel="stylesheet" href="/sites/default/files/css/css_Mmol5iJuteUbAbRIKRxiOtCHCD-fWihr50zj8EGzQaI.css?pn63js" media="all" />
<!--[if lte IE 8]>
<script src="/sites/default/files/js/js_VtafjXmRvoUgAzqzYTA3Wrjkx9wcWhjP0G4ZnnqRamA.js"></script>
<![endif]-->
<script src="/core/assets/vendor/modernizr/modernizr.min.js?v=3.3.1"></script>
</head>
and here's the same when it wasn't:
<!DOCTYPE html>
<html lang="en" dir="ltr" prefix="content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# schema: http://schema.org/ sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema# ">
<head>
<meta charset="utf-8" />
<meta name="Generator" content="Drupal 8 (https://www.drupal.org)" />
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="" type="image/vnd.microsoft.icon" />
<title>Home | Mysite</title>
<link rel="stylesheet" href="/sites/default/files/css/css_Y0ScowQzqPz3pJL7NbGDylTe7nwkNrMj8BVEfe6cL_4.css?pn61f0" media="all" />
<!--[if lte IE 8]>
<script src="/sites/default/files/js/js_VtafjXmRvoUgAzqzYTA3Wrjkx9wcWhjP0G4ZnnqRamA.js"></script>
<![endif]-->
<script src="/core/assets/vendor/modernizr/modernizr.min.js?v=3.3.1"></script>
</head>
Notice the css files aren't included. As far as I could tell it was still spitting out the content, just there was no styling to go with it.
Looking through the issue queue I thought it sounded like this one: https://www.drupal.org/project/drupal/issues/3031128 I was seeing the "no unserializer" errors (though they didn't break the deployment) and the comment in the description "Afterward the theme of the site (In my case, Bootstrap) seems to be corrupted. The problem seems to go away after a "drush cr"." was exactly what I was experiencing, just for me it kept coming back. That issue was resolved and included in the 8.6.9 release however.
Then I found this one: https://www.drupal.org/project/drupal/issues/3031740 We deployed using drush 8 and again the description sounded similar so I applied the patch and deployed it. The new update function ran OK and for a while it looked good, then the problem recurred.
I then realised that my deployment also included a couple of minor module updates and a bootstrap theme update so I reverted bootstrap from 3.17 back to 3.16. No change.
Finally I reverted Drupal core back to 8.6.7 and the problem has gone away.
I have tried to reproduce the problem locally and so far have not been able to so it's possible it's something to do with either the live server environment (which is similar but not identical to our dev VMs) or it could be to do with multiple different users or higher load on the site? But I'm clutching at straws now.
The main reason to consider this major is I think because others have expressed similar symptoms in other reports and those resolutions don't appear to have fixed it for us and it appears to be something specifically about 8.6.9 that's causing the problem.
Comments
Comment #2
cilefen commentedDid "Class Drupal\Core\Extension\Extension has no unserializer" continue in the logs after the upgrade?
Comment #3
specky_rum commentedAfter the initial update, yes, I believe so, though I have no proof.
After the patch was applied and system update 601 - no. I checked the logs back to just after that and that error is not in there at all.
Comment #4
specky_rum commentedHeld off, then upgraded to 8.7.1. No recurrence of this issue.