-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite throwing an 500 error code for "attempt to write to readonly database" #1
Comments
I tried restarting the application on Fly.io but that did not fix the issue. Next we tried re-deploying to production, but deployment is now failing. Here are the logs for my most recent attempt:
|
Ben noticed the deployment was running python 3.11. I switched our python version in the Pipfile to match and re-deployed but it did not fix the issue. |
Here's the issue in the Datasette repo: |
New logs after trying out the fix in #2:
|
Huh... this is a different error from the one I saw from Ben. Ben's was here: https://gist.githubusercontent.com/palewire/85fc980427979ef040202651b4424895/raw/1b76628e0a3f4eb0cb625caa5741d58f92ff383b/flyio.log Key line: But here we're seeing something different: it looks like the error is this one:
Which is an error on startup, and looks to be in the Quoted: def check_connection(conn):
tables = [
r[0]
for r in conn.execute(
"select name from sqlite_master where type='table'"
).fetchall()
]
for table in tables:
try:
conn.execute(
f"PRAGMA table_info({escape_sqlite(table)});",
)
except sqlite3.OperationalError as e:
if e.args[0] == "no such module: VirtualSpatialIndex":
raise SpatialiteConnectionProblem(e)
else:
raise ConnectionProblem(e) Again though, there's nothing in there that looks remotely like a write query. How much disk space does the machine's volume have available? You should be able to tell by running:
The |
If it's a disk space issue then a short-term fix would be to expand the volume size: https://fly.io/docs/reference/volumes/
|
I'm checking on this, but there is an issue with Fly right now preventing the builder from launching. Fly is aware of it and hopefully should address it shortly. I will post back when I can test. My immediate thought is your hunch is spot on. I remember looking and seeing that we were getting close to the 1gb mark on the databases stored there. That is what we had allocated to the volume, so I have bumped it up to 2gb. I'll let you know when I deploy and test. |
Running out of disk space is very likely to cause this kind of issue - I think allocating a bunch more (maybe 10 or 20GB) is the best next step |
I just bumped the allocation up to 20gb, but am still getting the same errors that I have been seeing. |
Datasette is not working in production. Oddly enough it is functioning on the dev side of things.
Initial error was:
The text was updated successfully, but these errors were encountered: