500 error when trying to login / 'attempt to write a readonly database' in the logs
See original GitHub issueI recently started getting a 500 error when trying to access BabyBuddy.
At first I thought it was related to me using BabyBuddy behind NGINX Proxy Manager, so I updated to using CSRF_TRUSTED_ORIGINS
in the docker-compose file, but the issue persisted.
---
version: "2.1"
services:
babybuddy:
image: lscr.io/linuxserver/babybuddy
container_name: babybuddy
environment:
- TZ=Europe/London
- CSRF_TRUSTED_ORIGINS=https://babybuddy.mydomain.com
- SECURE_PROXY_SSL_HEADER=True
- DEBUG=1
volumes:
- /home/graham/docker/babybuddy:/config
ports:
- 8002:8000
restart: unless-stopped
To test this, I turned off all the things related to SSL/NGINX Proxy Manager and accessed it directly through it’s IP Address and got the same error. I turned on debugging, and I noticed I was getting the following error:
attempt to write a readonly database
Request Method: | POST
-- | --
http://192.168.1.220:8002/login/
4.0.2
OperationalError
attempt to write a readonly database
I’m running this through Docker-Compose on a Ubuntu system, so I had a look at the permissions and couldn’t see any issue there.
Any ideas where I could start to look for an issue? Everything was working fine yesterday and I didn’t change anything which is very curious.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
API error (500): Attempt to write a readonly database #18816
We've got below error messages one of worker nodes. the containers just got spawned. but, didn't come up properly with this messages.
Read more >Attempt to write a readonly database - Django w/ SELinux error
I've managed to successfully integrate Django-CMS into Django and when I visit the local IP, I see my pages. However, when I try...
Read more >"attempt to write a readonly database" although 777 - Grafana
I wanted to migrate my grafana database to a new host (Ubuntu 19.10) ... old grafana.db to the new server I get this...
Read more >Failed: Attempt to write a readonly database. Error code: 8:8
Attempting to clean LocalSpeedVault via CMD results in error: "Failed: Attempt to write a readonly database. Error code: 8:8".
Read more >How to Fix a 500 Internal Server Error on Your WordPress Site
Issues with your database server. A number of things could be wrong on the web hosts end, such as the database being overloaded...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad ya got it (mostly) sorted! I’m not sure what the default permissions are but I imagine you don’t want to leave the database
777
😆Well it totally looks like that was it… Now I’m getting ‘database or disk full’, erorr but that’s expected for this test volume I’m doing this on so not surprised.
Not sure what happened to it - I just noticed the permissions on my whole babybuddy folder are wonky, as I can’t edit the docker-compose I made now without sudo 🤔 Interesting.
Thank you for your patience and entertaining my silly issue! I definitely need to donate to you to support your efforts with this great project.