Describe the problem/error/question
I’ve deployed an Azure Container App running the latest n8nio/n8n
image. I also created a Storage Account with a File Share to persist the database.sqlite
file between container restarts.
When I run the app without mounting the file share, the app starts successfully — but all data is lost after a restart, as expected.
However, when I mount the Azure File Share and point N8N to use /n8npoctestfileshare/.n8n/database.sqlite
as the database path, the container fails with the following error: SQLITE_BUSY: database is locked.
I’ve verified that:
- The file share is mounted correctly
- The folder
/n8npoctestfileshare/.n8n/
and the filedatabase.sqlite
do get created - No other container or process is accessing this database file
What could be causing the locked database issue when using Azure File Share, even on first startup? Is there a known limitation or special handling required when using SQLite with mounted CIFS volumes in this context?
Environment Variables in Use:
- GENERIC_TIMEZONE: Etc/UTC
- TRUST_PROXY: true
- N8N_BASIC_AUTH: true
- N8N_BASIC_AUTH_USER: *user*
- N8N_BASIC_AUTH_PASSWORD: *pass*
- WEBHOOK_URL: *container_app_url*
- EXECUTIONS_PROCESS: main
- DB_SQLITE_POOL_SIZE: 1
- N8N_USER_FOLDER: /n8npoctestfileshare
- DB_SQLITE_DATABASE: /n8npoctestfileshare/.n8n/database.sqlite
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: false
What is the error message (if any)?
“SQLITE_BUSY: database is locked”
Logs (from most recent):
- Last session crashed
- There was an error initializing DB
- SQLITE_BUSY: database is locked
- User settings loaded from: /n8npoctestfileshare/.n8n/config
Permissions 0777 for n8n settings file /n8npoctestfileshare/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false. - Initializing n8n process
Please share your workflow
No workflow can be created yet.
Information on your n8n setup
- n8n version: Current
n8nio/n8n:latest
Docker image (I believe it’s v1.100.1) - Database: SQLite
- n8n EXECUTIONS_PROCESS setting: main
- Running n8n via: Azure Container App (using Docker Hub image)