Closed michaelhue closed 5 years ago
What version of Blitz are you running? And is this happening during cache warming or simply when visiting the site?
I'm on the latest v2.3.2
but did have issues with earlier versions as well. There is no automated cache warming on my site, seems to happen when visitors access entry pages.
Here is another error:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
tabmag2
.blitz_elementcaches
, CONSTRAINTblitz_elementcaches_cacheId_fk
FOREIGN KEY (cacheId
) REFERENCESblitz_caches
(id
) ON DELETE CASCADE ON UPDATE CASCADE) The SQL being executed was: INSERT INTOblitz_elementcaches
(cacheId
,elementId
) VALUES (27, 24180), (27, 1339), (27, 22657), (27, 26301), (27, 22652), (27, 83147), (27, 45702), (27, 24408), (27, 24976), (27, 24977), (27, 6274), (27, 1359), (27, 1357), (27, 135333), (27, 14799), (27, 20128), (27, 32639), (27, 6857), (27, 28969), (27, 36945), (27, 36996), (27, 37672), (27, 40057), (27, 41905), (27, 41982), (27, 133947), (27, 42410), (27, 49946), (27, 89636), (27, 124865), (27, 43973), (27, 19648), (27, 42298), (27, 14849), (27, 22653), (27, 25388), (27, 28933), (27, 36086), (27, 37000), (27, 37649), (27, 39809), (27, 41660), (27, 41930), (27, 43974), (27, 64754), (27, 1366)
I'm using Sentry for error tracking, so I have good data for every error event. Let me know if you need more info.
If you are on discord then would you mind chatting me (BenCroker
) and we can troubleshoot together? There are mutex locks in place to avoid integrity constraint violations so I'm not sure why this might be happening.
Sure thing, I just need your four-digit tag to add you on Discord. I'm happyentropy#2066
.
You'll find me in the Craft channel :) BenCroker#7494
Just released 2.3.3 which optimises the cache invalidation process. The cache should be refreshed following the update to take advantage of the improvements.
I updated to 2.3.3 on friday and haven't seen any errors since. I think we can close this for now, thanks for your help!
Glad to hear it!
I get repeated integrity constraint violation errors on my Blitz powered site.
Here is an example:
I followed the advice in #84, re-installed the plugin and checked the indexes. But that didn't help. Any ideas?
Full stack trace: