Closed boryn closed 1 month ago
Just got a new email at 08:35:
SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "scheduled_task_executions_uuid_unique"
DETAIL: Key (uuid)=(vgsgwkc) already exists. (Connection: pgsql, SQL: insert into "scheduled_task_executions" ("scheduled_task_id", "uuid", "updated_at", "created_at") values (4, vgsgwkc, 2024-06-22 08:35:03, 2024-06-22 08:35:03) returning "id")
and what is interesting, at the Scheduled Task this run is indeed missing at the Recent executions list (though not sure yet if the task itself was run or not):
This happens randomly at different times, no repeatable schedule for the notifications, screenshot with emails:
I think the problem here is that Coolify current creates the uuid on the fly, whereas it should rely on the database to create that. It can be fixed but requires some effort as this happens on multiple places (E.g. deployments, applications, servers).
I am also curious what @andrasbacsai his standpoint on this is. If you ask me, the uuid should be database-generated, in order to prevent uuid collisions.
Additionally, I have noticed that the real used domain is not substituted in the email body and the link goes to "localhost"
Any news on this matter? It is really annoying
Coolify: Scheduled task (Perfex) failed with output: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "scheduled_task_executions_uuid_unique" DETAIL: Key (uuid)=(n4wcs00) already exists. (Connection: pgsql, SQL: insert into "scheduled_task_executions" ("scheduled_task_id", "uuid", "updated_at", "created_at") values (2, n4wcs00, 2024-07-22 03:41:02, 2024-07-22 03:41:02) returning "id")
This will be fixed in the upcoming version. Coolify will use full length cuid2 (so more random) everywhere, not a 7 chars long cuid2.
Description
Few times a day (~5) we receive email notification with subject: Coolify: [ACTION REQUIRED] Scheduled task (Cron scheduler) failed.
and with the content:
In the messages, the uuid changes like ggsw0s4, h04s4ss, etc.
Minimal Reproduction (if possible, example repository)
In the Scheduled Tasks there is only one defined job, it is Laravel's scheduler:
php artisan schedule:run
with frequency* * * * *
As the above error mentions
"scheduled_task_executions"
and duplicated uuid at this table, it must be something related to Coolify itself, this error does not come from the the commands fired by Laravel.Exception or Error
No response
Version
v4.0.0-beta.297