Cron jobs seem to halt to this error in cron.log:
main.ERROR: Cron Job analytics_subscribe has an error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (DATABASENAME
.oauth_token
, CONSTRAINT OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID
FOREIGN KEY (consumer_id
) REFERENCES oauth_consumer
(entity_id
) ON DELETE CASCADE), query was: INSERT INTO oauth_token
(consumer_id
, type
, token
, secret
, verifier
, callback_url
, user_type
) VALUES (?, ?, ?, ?, ?, ?, ?). Statistics: {“sum”:0,”count”:1,”realmem”:0,”emalloc”:0,”realmem_start”:237502464,”emalloc_start”:234244904} [] []
I have Magento 2.4.5-p1, PHP7.4, Elasticsearch 7.17
Any ideas what causes this?