Skip to content

Consistently Getting "Could not set lock on file" When Using the DuckDB Adapter #1750

@kylejbrk

Description

@kylejbrk

Expected behavior

To be able to use dbt power user and the duckdb adapter without the extension causing a lock.

Actual behavior

I get the following error a lot when working with duckdb in the dbt power user extension:

Runtime Error
IO Error: Could not set lock on file "/data/duckdb/foodpilled.duckdb": Conflicting lock is held in /usr/local/bin/python3.12 (PID 1637). See also https://duckdb.org/docs/stable/connect/concurrency

The process that is causing the lock:

Image

Steps To Reproduce

Not sure how to specifically reproduce. It seems to just happen after using the extension for a while.

Log output/Screenshots

No response

Operating System

Docker python:3.12.3-slim-bullseye

dbt version

1.9.8

dbt Adapter

DuckDB

dbt Power User version

0.58.11

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions