RamiAwar / dataline

Chat with your data - AI data analysis and visualization on CSV, Postgres, MySQL, Snowflake, SQLite...
https://dataline.app
GNU General Public License v3.0
129 stars 6 forks source link

Docker build locks database #190

Closed RamiAwar closed 3 weeks ago

RamiAwar commented 4 weeks ago

Whenever running the app in docker, the database seems to get locked automatically after running a first query. Even the first message is not saved, indicating that the lock happened from the beginning.

To replicate:

Clean DB Upload CSV file Perform query in a new chat

IN addition, all sample DBs fail to initialize.

RamiAwar commented 4 weeks ago

Volume looks like it's empty from the start, suggesting that the mount is faulty.

It should at least contain the sample DBs.

RamiAwar commented 4 weeks ago

Partial fix for DB samples added.

I have a hypothesis that the DB is not getting stored where it should be, on the volume. Might be env var related, we haven't tested docker properly since we added the user data configs.

RamiAwar commented 4 weeks ago

Can confirm DB is being created successfully in the docker volume. Just not visible in docker desktop.

To access the docker volume path seen in docker volume inspect dataline we need to use this:

docker run -it --rm --privileged --pid=host alpine:edge nsenter -t 1 -m -u -n -i sh to get into the main VM docker uses. Then the path is accessible.

image

This narrows it down a bit. Seems to be something accessing the DB and not closing the connection properly, and this ONLY happens when dockerized.

anthony2261 commented 3 weeks ago

Fixed due to fastapi breaking change