Database is locked

130 views
Skip to first unread message

Gökhan Topcuoğlu

unread,
Jul 30, 2017, 5:44:58 AM7/30/17
to Mayan EDMS
Hello,

I want to upload pdf documents to EDMS but I am getting "Database is locked" error but the files appear in document_storage folder. What can i do for this error. Thank you

Best Regards
Screenshot_20170730_123710.png

David Kornahrens

unread,
Jul 30, 2017, 5:05:31 PM7/30/17
to Mayan EDMS
I would start by restarting the instance.  Did you deploy through Docker?

Roberto Rosario

unread,
Jul 30, 2017, 8:37:08 PM7/30/17
to Mayan EDMS
Hi,

This is an issue with the default database manager used to make installations simple: SQLite. SQLite is a lightweight database manager it is very good and ideal for getting started for the trade off is lower concurrency than other database managers like PostgreSQL or MySQL. You specific usage/hardware/OS, or others combination is hitting the concurrency limit. Here is a longer explanation: https://stackoverflow.com/questions/28958580/django-sqlite-database-is-locked#28959683

If you are using the Docker method you can deploy with Postgres or MySQL. The Mayan Docker image has support out-of-the-box for both. Here is a blog post explaining how to deploy Mayan EDMS using Docker with MySQL as the database: https://www.mayan-edms.com/post/deploy-mayan-docker-mysql/

In the meantime, to unlock the database just restart the container with:

docker restart mayan-edms

Gökhan Topcuoğlu

unread,
Jul 31, 2017, 5:22:31 AM7/31/17
to Mayan EDMS
Hi,

My problem is solved with MySQL

Thank you


31 Temmuz 2017 Pazartesi 03:37:08 UTC+3 tarihinde Roberto Rosario yazdı:

Morgan Boyd

unread,
Jan 5, 2018, 3:35:30 PM1/5/18
to Mayan EDMS
Greetings -

First off, I love the software! It's so powerful!!!!

I too am getting the database is locked message, so I began testing the MySQL modification you mentioned (see no problems, and the app is much quicker). I'd like to port my images and data over from the SQLITE3 Docker container - what is the recommended strategy for doing so? 

Does your existing script have a process that detects the MySQL instance and the presence of the sqlite3 file - and handles the migration automatically?

If no - I have no problem working through the 1500 files again... just wanted to check before diving into that hours long process.
Reply all
Reply to author
Forward
0 new messages