Urgent: SQLITE_READONLY error after Flowise update - Potential Volume/Permission Issue
pietrobonomo
PROOP

2 months ago

Hi,

I am writing to report a critical issue encountered after updating my Flowise deployment yesterday.

The Issue: Immediately after the update, the application doesn't let me log in with an SQLITE_READONLY: attempt to write a readonly database error.

Context & Troubleshooting:

  • Comparison: I have the exact same Flowise version and configuration deployed on Render, where it is working perfectly. This suggests the issue is likely related to the Railway environment/infrastructure rather than a bug in the Flowise code itself.

  • Previous State: The previous deployment on Railway was working correctly before this update.

  • Data Persistency: I am using a volume to persist the SQLite database.

Impact: I am currently unable to use the application, and I am extremely concerned about the integrity of my data. I cannot afford to lose the flows stored in this database.

Could you please investigate if there are any permission issues with the attached volume or the file system for my project?

Attachments

Solved$10 Bounty

Pinned Solution

domehane
FREE

2 months ago

the volume mount path looks correct at /opt/railway/.flowise which is good and we need to access the shell to see whats actually on that volume. heres how:

using railway cli:

railway login
railway link (select your project and service)
railway shell

then once youre in the shell run:

ls -la /opt/railway/.flowise/
find /opt/railway/.flowise -type f -name "*.sqlite*"

this will show if theres any database files there and where they are

8 Replies

brody
EMPLOYEE

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 months ago


domehane
FREE

2 months ago

i think what is happening is railway mounts volumes as root but flowise runs as a non-root user in the container. after the update this permission mismatch is blocking write access to your sqlite db

the quick fix is to add this env variable:

RAILWAY_RUN_UID=0

in your service variables tab, add that, and redeploy. what this does is force the container to run as root so it can actually write to the database files

also make sure your volume is mounted to /opt/railway/.flowise and you probably want these variables too:

DATABASE_PATH=/opt/railway/.flowise
APIKEY_PATH=/opt/railway/.flowise
SECRETKEY_PATH=/opt/railway/.flowise

domehane

i think what is happening is railway mounts volumes as root but flowise runs as a non-root user in the container. after the update this permission mismatch is blocking write access to your sqlite dbthe quick fix is to add this env variable:RAILWAY_RUN_UID=0in your service variables tab, add that, and redeploy. what this does is force the container to run as root so it can actually write to the database filesalso make sure your volume is mounted to /opt/railway/.flowise and you probably want these variables too:DATABASE_PATH=/opt/railway/.flowise APIKEY_PATH=/opt/railway/.flowise SECRETKEY_PATH=/opt/railway/.flowise

pietrobonomo
PROOP

2 months ago

Thanks, now I can signup/login but my flows are lost which is a disaster! A disaster that you cannot imagine


domehane
FREE

2 months ago

go to railway dashboard and check your volume settings, what path is it actually mounted to?


domehane
FREE

2 months ago

the database file itself should still exist somewhere on that volume unless the volume got recreated. if the volume is the same one from before, your data is definitely still there we just need to point flowise to the right location


domehane
FREE

2 months ago

and can you tell me if you see any .sqlite files if you browse the volume?


pietrobonomo
PROOP

2 months ago

the volume doesn't seems browsable the volume.


domehane
FREE

2 months ago

the volume mount path looks correct at /opt/railway/.flowise which is good and we need to access the shell to see whats actually on that volume. heres how:

using railway cli:

railway login
railway link (select your project and service)
railway shell

then once youre in the shell run:

ls -la /opt/railway/.flowise/
find /opt/railway/.flowise -type f -name "*.sqlite*"

this will show if theres any database files there and where they are


@domehane

Thanks a lot! Using your tip I managed recovered my workflows


Status changed to Solved ray-chen about 1 month ago


Loading...