While searching for the same problem and trying to find a solution not related to sessions (because I made it), as well as bad PHP code (because I have several sites running exactly in the same version of WordPress, and no one has problems ... except one), I came up with the answer, which said that a possible solution is to remove some buggy extension (usually memcache / d, but maybe something else).
Since I had the same site working flawlessly on one Ubuntu server, when switching to a newer server, I immediately suspected that it caused a problem with PHP 5.5 to 7. It was just weird because no other site Suffered. Then I remembered that there was something else on this new server: I also installed New Relic . This is both an extension and a small server that runs in the background and sends a lot of analytic data to New Relic for processing. This is supposedly an extension of PHP 5, but, surprisingly, it loads well on PHP 7 as well.
Now comes the tricky bit. At some point, I installed W3 Total Cache to install WordPress for this particular site. Subsequently, I saw that the performance of this server was so spectacular that W3TC was not required, and simply adhered to a much simpler configuration. Therefore, I was able to remove W3TC. This is all very nice, but ... I forgot that I also turned the new relic into W3TC (presumably, it adds some additional analytic data to send to New Relic). When uninstalling W3TC, there was probably something in the New Relic configuration on my server that was still trying to send data through the W3TC interface (assuming W3TC has an interface ... I really don't know how this works at that level) , and since this particular bit of code was missing, the php_fpm handler for this website fails ... sometimes. Not all the time, because I assume that in most cases nginx sent static pages back. Or maybe php_fpm, configured to "recycle" after 100 calls or so, will crash. No matter what exactly happened, it was definitely related to New Relic - as soon as I removed the New Relic extension from PHP, this website returned to normal operation.
Since this is such a specific scenario, I simply write this as an answer, in the distant case, that someone in the future will catch a problem for a specific problem.
source share