error duplicate key postgres
I'm trying to reimport 80 papers from HAL with a python script and the graphql API, with a 3 seconds delay between every import, but I sometimes observe this postgresql error:
postgres_1 | 2020-07-01 14:25:23.304 UTC [302] ERROR: duplicate key value violates unique constraint "django_dramatiq_task_pkey"
and after some time, it completely crashes with the following error that is repeated infinitely:
postgres_1 | 2020-07-01 14:13:21.881 UTC [673] FATAL: remaining connection slots are reserved for non-replication superuser connections