git push to dokku fails, database is locked

  • Posted on December 4, 2013
  • ross9885Asked by ross9885

I just finished the NodeJS / Dokku tutorial at, and everything worked great. Now, when I edited the demo app.js (added a route) and tried to push it to the server, I get an error about a locked database file.

$ git push dokku master Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 363 bytes | 0 bytes/s, done. Total 3 (delta 2), reused 0 (delta 0) -----> Building pigimon … remote: 2013/12/04 02:55:41 Error: The database file is locked: database is locked To dokku@<ip address>:pigimon ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to ‘dokku@<ip address>:pigimon’

This command worked fine the first time I used it during the tutorial.

I’ve tried stopping all docker containers, but that didn’t change anything. I searched through the issues for dokku and dokku-pg-plugin, which the demo uses, but found nothing relevant about locked databases. I am new to dokku, Digital Ocean and VPSs in general, and I am not even sure how to start troubleshooting here; if anyone could offer a suggestion about what I should be looking for or what this database is that the error refers to, that would be a big help.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If it isn’t building you can delete file /home/dokku/app/.build.lock

Try rebooting your droplet, does that fix it?

I tried to start the app and got the same error that Git ran into: <br> <br># dokku run pigimon <br>2013/12/04 03:38:38 Error: The database file is locked: database is locked <br> <br>I wonder if this is a problem with Postgress, I will try deploying and modifying a demo app that doesn’t use it. My real project doesn’t use Postgress anyway.