Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache generation does not seem stable #1

Open
devstudiolhooq opened this issue Dec 4, 2024 · 3 comments
Open

Cache generation does not seem stable #1

devstudiolhooq opened this issue Dec 4, 2024 · 3 comments
Labels
question Further information is requested

Comments

@devstudiolhooq
Copy link

devstudiolhooq commented Dec 4, 2024

Support Request

Hello,

How stable is the Blitz integration with Craft Cloud? The cache generation seems to fail on start, or get stuck like this:

I'm using this in blitz.php

 'production' => [
 'cacheStorageType' => 'putyourlightson\blitzcloud\CloudStorage',
 'cacheGeneratorType' => 'putyourlightson\blitzcloud\CloudGenerator',
 'cachePurgerType' => 'putyourlightson\blitzcloud\CloudPurger',
 'cacheStorageSettings' => [],
 ]

Thank you,

Plugin Version

2.0.0 / Blitz 5.9.3 / Craft 5.5.3

@devstudiolhooq devstudiolhooq added the question Further information is requested label Dec 4, 2024
@bencroker
Copy link
Contributor

I haven’t done much testing with cache generation in Craft Cloud. What exactly are you seeing? This could come down to Cloud enforcing a timeout from web requests. Are you running cache generation from the command line or via web requests? I assume the former should work, not sure about the latter.

@devstudiolhooq
Copy link
Author

Hello,

So it has to be via web request because there's a 15 min timeout on the command line and it needs around an hour it looks like (around 2000 pages).

Did some more testing and basically what seems to be happening is the queue says it's re-generating the cache but it's not. It's only re-generated when I load the page.
ie on a simple case, I do one edit to a page, save it. I see a quick purging / regenerating jobs in the queue, then I wait 5 minutes and open the page, and the Blitz timestamp at the bottom is the current time, not the time from 5 min ago when it was meant to do the regeneration.

I've asked Brad at P&T if it could be linked to the image generation, and he said "on Craft Cloud because all Cloud transforms are generated on-demand."
Would that interfere with Blitz?:
https://putyourlightson.com/plugins/blitz#the-site-is-not-cached-when-i-visit-it
I activated debug, but can't access the debug file on Cloud.

Thank you!

@bencroker
Copy link
Contributor

bencroker commented Dec 7, 2024

So it has to be via web request because there's a 15 min timeout on the command line and it needs around an hour it looks like (around 2000 pages).

Blitz batches queue jobs, so the 15 minute timeout shouldn’t be an issue. It defaults to a batch size of 100 using the driverJobBatchSize config setting.

Did some more testing and basically what seems to be happening is the queue says it's re-generating the cache but it's not. It's only re-generated when I load the page.

Can you please attache a diagnostics report so I can see what your config setup looks like?

I've asked Brad at P&T if it could be linked to the image generation, and he said "on Craft Cloud because all Cloud transforms are generated on-demand."
Would that interfere with Blitz?

Possibly. When you visit an uncached page, do you see assets/generate-transform anywhere in the source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants