I encountered an issue in my application that I believe was caused from a misuse / misunderstanding of setting fly secrets across organizations. As an aside, it would be nice to have greater isolation guarantees between organizations from the cli. Anyway, I ended up trying to recreate my entire environment from scratch by taking apps down (2), removing their volumes (2), and deleting the litefs cloud cluster from the GUI. I then began the steps from scratch and after working through some consul issues, I finally have the app up and running again. The problem is that the sqlite database is not being created in the new cluster and I can’t for the life of me figure out anything or any similar issues others have encountered. I’d love a hand if possible on what steps to take to get my app back up and running. It’s currently in development, and I am ok with total data loss at this point. I am using prisma and it 1 migration is detected but determined not to be needed to run.
Do you mean you don’t see the database in LiteFS Cloud UI? Does LiteFS itself work? E.g. can you read/write the DB in your app?
It appears that your app has two different secrets set: LITE_FS_CLOUD_TOKEN
and LITEFS_CLOUD_TOKEN
. I suspect that LITEFS_CLOUD_TOKEN
contains a token for the LiteFS cluster that’s already been deleted.
Try to create a new LiteFS Cloud token in the UI and assign it to LITEFS_CLOUD_TOKEN
secret. You can remove the LITE_FS_CLOUD_TOKEN
secret as it’s not really used.
Hi @pavel, thanks for the response! To clarify, I cannot see the db in the LiteFS Cloud UI and also I cannot read/write to the db from the application. I did remove the unused environment variable and went through the create token flow one more time but still seeing the same issue. I am thinking of switching to postgres at the moment unless there may be something else sticking out to you?
Looking at the logs, LiteFS starts up without any errors. I don’t have much experience with Prisma and how the database access is configured there, so I’m not sure about this log line:
Datasource “db”: SQLite database “‘dbname’” at “file:‘dbname’”
Shouldn’t it be at file:/litefs/'dbname'
? E.g. are you sure you are opening the database on LiteFS, and not on local FS?
@pavel I’m not sure how to answer that for sure, but is it fair to say that if data was previously persisting across deployments that it was litefs?
Yeah, I think so. If nothing has been changed in the app config it should work the same.
I don’t have any more ideas. Logs don’t indicate any problems with LiteFS/LiteFS Cloud, so I’m not sure what’s going on here.
No worries, and thanks for the help. It feels like a little bit of beta pain. I am moving on the postgres for the time being but excited to keep an eye out on this for the future.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.