Hi team :slightly_smiling_face: I'm using the `Das...
# ask-community
a
Hi team 🙂 I'm using the
DaskTaskRunner()
to run my flow using multiprocessing, and in one of my tasks I'm connecting to a db and also making sure the connection is closed when the task is done. I thought that the fact that each process can be allowed to have it's own connection getting the following error:
ProgrammingError: (sqlite3.ProgrammingError) SQLite objects created in a thread can only be used in that same thread
Do I need to add maybe additional kwargs to
DaskTaskRunner()
?
r
You need to set up a Postgresql as log database to use parallel tasks in Prefect. The default sqlite does not accept concurrent connections.
a
It actually worked perfectly in prefect 1 so I thought maybe it’s just a configuration thing when setting up dask Also I’m using dask to run in parallel not concurrently so it shouldn’t happen
a
Thanks! I’ll take a look and update if it helps 🙂