Closed dbrookes closed 4 years ago
Sounds like the task didn’t get saved correctly to begin with. Can you send a DB backup over to support@craftcms.com?
@brandonkelly @dbrookes was there ever a solution to this? I'm encountering the same problem today running PostgresSQL 9.6 and elastic beanstalk php 7.2
@erktime I’m sure the issue ended up being environmental; same feedback for you.
Thanks @brandonkelly, that's definitely the issue. For me it was the fact that PostgreSQL 9+ outputs bytea types (used to store the craft queue job details) as HEX rather than the former escaped syntax. the yii2 unserialize method was getting something like:
x4f3a34323a2263726166745c71756575655c6a6f62735c44656c6574655374616c6554656d706c617465436163686573223a333a7b733a393a22656c656d656e744964223b613a363a7b693a303b693a373b693a313b693a383b693a323b693a393b693a333b693a31323b693a343b693a31333b693a353b693a323b7d733a31313a226465736372697074696f6e223b4e3b733a33303a220063726166745c71756575655c426173654a6f62005f70726f6772657373223b693a303b7d
rather than what it expected, something like:
O:42:"craft\queue\jobs\DeleteStaleTemplateCaches":3:{s:9:"elementId";a:3:{i:0;i:49;i:1;i:50;i:2;i:2;}s:11:"description";N;s:30:" craft\queue\BaseJob _progress";i:0;}
I think my issue is related to using AWS RDS rather than pure PostgreSQL. My fix was to alter my db to always be in escape
mode:
ALTER DATABASE dbname SET bytea_output TO 'escape';
@angrybrad can you look into this? ^
@erktime
I think my issue is related to using AWS RDS rather than pure PostgreSQL.
Do you mean it was happening with Aurora PostreSQL instead of native PostgreSQL? Is this the same fo you @dbrookes?
It was something to do with the PHP 7.1 AWS Elastic beanstalk environment. I used the docker environment instead and it was fine - I didn't have to make any changes to PostgreSQL (non Aurora)
@angrybrad yes it was Aurora PostgreSQL instead of native on RDS, but i'm not sure if that was true issue or not. I did not try RDS native Postgres against elastic beanstalk php 7.2
Better late than never? https://github.com/craftcms/cms/commit/fb018d99b501d8e6074a03b8c08e46aadb6bde24
Note that this was fixed on the 3.4 branch.
Description
The deleting stale template caches task is unable to start, I also can't run any other tasks from other plugins.
Running locally via docker and PHP 7.1.16 it does work (connected to prod database), the only difference I can see is that the production environment runs PHP 7.1.13
This is happening on the default PHP 7.1 AWS Elastic beanstalk environment without any modifications.
Error:
Stack trace:
JSON response
[{"id":712,"status":2,"progress":0,"description":"Deleting stale template caches","error":null}]
I've checked:
Steps to reproduce
Additional info