Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

margusheinmaa's avatar

uuid on queue failed jobs is empty

Hello,

I'm getting the following error on a queue run, I'm right now forcing the job to fail, to get it logged, but for some reason it's not working and fails because of a SQL error, field is not filled and not sure why

[previous exception] [object] (Doctrine\DBAL\Driver\PDO\Exception(code: HY000): SQLSTATE[HY000]: General error: 1364 Field 'uuid' doesn't have a default value at /Users/margus/Sites/api/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18)

I'm using a rabbitmq setup there can that be the cause of it ?

I'm setting the uniqueId on the jobs and dispatching them with

UserServiceJob::dispatch($user, $action);

Any suggestion is welcome

Thank you

0 likes
3 replies
margusheinmaa's avatar

Not sure if this is correct but after checking somethings and adding the following configuration it started to work, not sure if I have seen this part in docs

queue.failed.driver = 'database-uuids'
5 likes
ManuDoni's avatar

Thanks man! the lumen migration file for the failed_jobs table uses uuid but the default config makes the framework use DatabaseFailedJobProvider instead of DatabaseUuidFailedJobProvider. I don't know for Laravel but i think it's the same. I edited queue.php file like this:

    'failed' => [
        'database' => env('DB_CONNECTION', 'mysql'),
        'table' => env('QUEUE_FAILED_TABLE', 'failed_jobs'),
        'driver' => 'database-uuids',
    ],
3 likes

Please or to participate in this conversation.