Skip to content

Jobs get stuck #863

@bartrylant

Description

@bartrylant

Bug Report

The last couple of weeks (after updating Blitz but I cannot remember from which to which version), jobs get stuck in the queue. I have read this article https://putyourlightson.com/plugins/blitz#the-refresh-cache-queue-job-is-stalling, the momory_limit is already higher than suggested, max_execution_time is 600, queue runs with supervisor, and I have disabled all tracking of queries and elements (I refresh the specific pages based on the section id). So not sure what else to try. (Not sure why it says "Queue jobs are configured to run automatically via web requests." in the diagnostics.)

Image Image

Diagnostics Report

Application Info

  • PHP version: 8.4.14
  • Craft edition & version: Pro 5.8.20
  • Database driver & version: MySQL 8.4.7

Installed Plugins

  • Algolia: 5.0.1
  • Amazon S3: 2.2.3
  • Asset Rev: 8.0.0
  • Author toolbar: v1.2.9-beta
  • Autologin: 4.0.1
  • Beam: 5.0.0
  • Blitz: 5.12.5
  • Brevo: 1.0.2
  • Bulk Edit: 5.0.0-beta.1
  • Bunny.net: 1.1.0
  • Cache Igniter: 2.0.0
  • CKEditor: 4.11.0
  • Date Range Field: 5.0.0-beta.4
  • Dumper: 5.0.1
  • Empty Coalesce: 5.0.0
  • Feed Me: 6.11.0
  • Formie: dev-craft-5
  • iCalendar: 5.0.0
  • ImageOptimize: 5.0.7
  • Incognito Field: 2.0.1
  • Knock Knock: 3.0.4
  • Mailgun: 3.1.0
  • Maps: 5.0.4
  • Mollie Payments: 5.3.0
  • Navigation: 3.0.15
  • oEmbed: 3.1.6
  • Retour: 5.0.12
  • Scout: 5.0.7
  • Sections Field: 1.0.1
  • SEO: 5.1.19
  • Sheets to Tables: 1.2.0
  • Sherlock: 5.2.0
  • Social Feeds: 2.0.10
  • Sprig: 3.7.1
  • Super Table: 4.0.5
  • Table Maker: 5.0.6
  • Template Guard: 4.0.0
  • Typed link field: 3.0.0-beta
  • Typogrify: 5.0.1
  • User Group Field: 4.0.1
  • Video Utils: 3.0.2

Loaded Modules

  • mail-on-new-entry: modules\mailonnewentry\MailOnNewEntry
  • codeeditor: nystudio107\codeeditor\CodeEditor
  • verbb-base: verbb\base\Base
  • sprig-core: putyourlightson\sprig\Sprig

Blitz Plugin Settings

{
    "debug": false,
    "hintsEnabled": true,
    "cachingEnabled": true,
    "refreshCacheEnabled": true,
    "refreshMode": 1,
    "includedUriPatterns": [
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": ""
        },
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": ".*"
        }
    ],
    "excludedUriPatterns": [
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": "competities\/attendance"
        },
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": "competities\/ical"
        },
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": "refs\/.*"
        },
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": "refs\/"
        },
        {
            "enabled": "1",
            "siteId": "1",
            "uriPattern": "organisatie\/wedstrijdzaken\/.*"
        }
    ],
    "cacheStorageType": "putyourlightson\\blitz\\drivers\\storage\\FileStorage",
    "cacheStorageSettings": {
        "folderPath": "@webroot\/cache\/blitz",
        "compressCachedValues": "1"
    },
    "cacheStorageTypes": [],
    "cacheGeneratorType": "putyourlightson\\blitz\\drivers\\generators\\HttpGenerator",
    "cacheGeneratorSettings": {
        "concurrency": "2",
        "useBasicAuth": "",
        "username": "",
        "password": ""
    },
    "cacheGeneratorTypes": [],
    "customSiteUris": [],
    "cachePurgerType": "putyourlightson\\blitz\\drivers\\purgers\\CloudflarePurger",
    "cachePurgerSettings": {
        "zoneIds": {
            "***": {
                "zoneId": "***"
            },
            "5***": {
                "zoneId": ""
            },
            "a***8e1": {
                "zoneId": ""
            },
            "bf***7": {
                "zoneId": ""
            }
        },
        "authenticationMethod": "apiKey",
        "apiToken": "",
        "apiKey": "*************************************",
        "email": "****"
    },
    "cachePurgerTypes": [],
    "deployerType": "putyourlightson\\blitz\\drivers\\deployers\\DummyDeployer",
    "deployerSettings": [],
    "deployerTypes": [],
    "ssiEnabled": false,
    "ssiTagFormat": "<!--#include virtual=\"{uri}\" -->",
    "detectSsiEnabled": true,
    "esiEnabled": false,
    "cachedIncludePathParam": "p",
    "onlyCacheLowercaseUris": false,
    "cacheActionRequests": false,
    "queryStringCaching": 1,
    "includedQueryStringParams": [
        {
            "enabled": "1",
            "siteId": "",
            "queryStringParam": ".*"
        }
    ],
    "excludedQueryStringParams": [
        {
            "enabled": "1",
            "siteId": "",
            "queryStringParam": "gclid"
        },
        {
            "enabled": "1",
            "siteId": "",
            "queryStringParam": "fbclid"
        }
    ],
    "apiKey": "",
    "generatePagesWithQueryStringParams": true,
    "purgeAssetImagesWhenChanged": true,
    "refreshCacheAutomaticallyForGlobals": true,
    "refreshCacheWhenElementMovedInStructure": true,
    "refreshCacheWhenElementSavedUnchanged": false,
    "refreshCacheWhenElementSavedNotLive": false,
    "refreshExpiredCacheAfterVisit": true,
    "cacheNonHtmlResponses": false,
    "trackElements": true,
    "trackElementQueries": true,
    "excludedTrackedElementQueryParams": [],
    "cacheDuration": 0,
    "nonCacheableElementTypes": [],
    "sourceIdAttributes": [],
    "liveStatuses": [],
    "integrations": [
        "putyourlightson\\blitz\\drivers\\integrations\\CommerceIntegration",
        "putyourlightson\\blitz\\drivers\\integrations\\FeedMeIntegration",
        "putyourlightson\\blitz\\drivers\\integrations\\SeomaticIntegration"
    ],
    "defaultCacheControlHeader": "no-cache, no-store, must-revalidate",
    "cacheControlHeader": "public, s-maxage=31536000, max-age=0",
    "cacheControlHeaderExpired": "public, s-maxage=5, max-age=0",
    "sendPoweredByHeader": true,
    "outputComments": true,
    "refreshCacheJobPriority": 10,
    "driverJobBatchSize": 100,
    "driverJobPriority": 100,
    "queueJobTtr": 6000,
    "maxRetryAttempts": 10,
    "maxUriLength": 2048,
    "maxUriIndexLength": 767,
    "mutexTimeout": 1,
    "commands": [],
    "injectScriptEvent": "DOMContentLoaded",
    "injectScriptPosition": 3
}

Recommendations

  • ❌ One or more globals exist and refreshCacheAutomaticallyForGlobals is enabled.
  • ❌ Queue jobs are configured to run automatically via web requests.
  • ❌ The blitz/cache/refresh-expired console command has not been executed within the past 24 hours.
  • ✅ Blitz is configured not to refresh cached pages when an element is saved but unchanged.
  • ✅ Blitz is configured not to refresh cached pages when an element is saved but not live.
  • ✅ Image transforms are configured to be generated before page load.
  • ✅ The @web alias is not used in the base URL of any sites.
  • ✅ The Async Queue plugin is not installed or enabled.

Site Tracking [1]

  • Tracked Pages: 150
  • Tracked Includes: 0
  • Tracked Actions: 0
  • Tracked Query String Params: 2
  • Tracked Elements: 240
    • craft\elements\Entry: 91
    • verbb\navigation\elements\Node: 56
    • craft\elements\Entry (nested): 49
    • craft\elements\Asset: 28
    • craft\elements\Category: 9
    • craft\elements\User: 6
    • verbb\formie\elements\Form: 1
  • Tracked Element Queries: 1
    • craft\elements\Entry: 1
  • Tracked Tags: 6

Site Tracking [2]

  • Tracked Pages: 0
  • Tracked Includes: 0
  • Tracked Actions: 0
  • Tracked Query String Params: 0
  • Tracked Elements: 0
  • Tracked Element Queries: 0
  • Tracked Tags: 0

Site Tracking [3]

  • Tracked Pages: 0
  • Tracked Includes: 0
  • Tracked Actions: 0
  • Tracked Query String Params: 0
  • Tracked Elements: 0
  • Tracked Element Queries: 0
  • Tracked Tags: 0

Site Tracking [4]

  • Tracked Pages: 0
  • Tracked Includes: 0
  • Tracked Actions: 0
  • Tracked Query String Params: 0
  • Tracked Elements: 0
  • Tracked Element Queries: 0
  • Tracked Tags: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions