minifranske
minifranske

Reputation: 1315

"Page is being generated." message after clearing page cache TYPO3 7.6

For multiple TYPO3 7 LTS installations we occasionally get the "Page is being generated." screen for the first couple of clicks through the site after clearing all the page cache.

First I thought it was because of the multiple request on the live environment that causes a race-condition while filling up the caches again. But we also have the problem on our local dev environments where the developer is the only person accessing the site. So a race-condition would be strange here.

Edit: Issue was that the page was being called twice. We had a bigtarget JavaScript in place that called the page twice where the first call build the cache but the request was canceled by the browser by the second request. And the second request then got the error message.

After fixing the js the users don't run into the message that often anymore.

Upvotes: 3

Views: 1555

Answers (1)

pgampe
pgampe

Reputation: 4578

This is a race condition. When TYPO3 creates a site, it first creates a page cache entry stating this The page is being generated. All other processes see this cache entry and stop rendering.

Once the first process finishes, it replaces this entry with the real cache content. This cache entry times out after some time (in case the process crashed, e.g. because of max execution timeout or memory limit).

This avoids a huge server load after clearing caches on busy (and even not so busy) sites.

A race condition on a dev server can still happen, when the browser reloads the page in the background, the developers accidentally reloads twice, etc.

Upvotes: 3

Related Questions