Open ai-st opened 1 year ago
Hi, sounds like you are using Azure notebooks - I believe this is due to the FS that azure notebooks is using.
https://stackoverflow.com/questions/53226642/sqlite3-database-is-locked-in-azure
Thanks! What would be a solution to be able to use the PeristentClient?
@HammadB Thanks for providing guidance. Creating a temp dir seems to work, after which the contents can be copied manually to a more permanent destination:
import tempfile
from pathlib import Path
chroma_path = Path(tempfile.gettempdir()) / 'chroma_db'
client = chromadb.PersistentClient(path=str(chroma_path))
This works, however having a clearer error message, and especially not waiting for 16 mins to get it would be very helpful?
I am experiencing a similar issue on my Mac in Python 3.10. My script creates a PersistentClient, does a simple list_collections(), and finishes. However the Python script does not exit immediately. It hangs on for a minute or two before releasing. This is a concern because when the object hangs on like this, it affects scalability. And there is no explicit close() method for the object. Is this a bug or expected behavior?
+1 I am facing the same issue. Any fix?
same problem here, chromadb==0.5.1
Hi,
I had similar issue as well, with an Azure AppService containing ChromaDB, saving the files on a mounted Azure File Share.
I had files with data previously created, so I couldn't delete everything and start from scratch.
So far, the solution that has worked for me is (we're still monitoring to check if everything is fine):
sqlite3 <database-file> 'PRAGMA journal_mode'
-> it returned delete
sqlite3 <database-file> 'PRAGMA journal_mode=wal;'
-> it returned nothingsqlite3 <database-file> 'PRAGMA journal_mode'
-> it returned wal
Hope this helps.
What happened?
When creating a persistent client on Azure, either inside a Notebook or on a compute the clients hang-on for 16min after creation: client = chromadb.PersistentClient()
After more than 16 min getting this error message:
OperationalError: database is locked
Specifying a path doesn't help either, same results.
Versions
Chroma 0.4.9, Python 3.10, Ubuntu 20.04.6 LTS
Relevant log output