Spaces:
Running
Running
Commit ·
f21fc8a
1
Parent(s): 8ad9904
fix: apply aggressive SQLite stability settings (EXCLUSIVE lock, MEMORY journal) to resolve disk I/O errors on HF Spaces
Browse filesFiles changed (2)
135 unmodified lines136137138139139140141142143143144145146147135 unmodified lines
db.Database.Migrate();
// Set journal mode to TRUNCATE for better compatibility with Docker/Cloud filesystems while keeping performance // Aggressive stability PRAGMAs for Cloud/Docker filesystems (Hugging Face) using (var command = db.Database.GetDbConnection().CreateCommand()) { db.Database.OpenConnection(); command.CommandText = "PRAGMA journal_mode=TRUNCATE; PRAGMA synchronous=NORMAL; PRAGMA locking_mode=NORMAL; PRAGMA temp_store=MEMORY;"; // journal_mode=MEMORY and locking_mode=EXCLUSIVE bypass most disk-locking issues command.CommandText = "PRAGMA journal_mode=MEMORY; PRAGMA synchronous=OFF; PRAGMA locking_mode=EXCLUSIVE; PRAGMA temp_store=MEMORY; PRAGMA cache_size=-20000;"; command.ExecuteNonQuery(); }
7 unmodified lines891011111213147 unmodified lines }, "AllowedHosts": "*", "ConnectionStrings": { "DefaultConnection": "Data Source=taskflow.db;Cache=Shared;Busy Timeout=5000" "DefaultConnection": "Data Source=/app/taskflow.db;Cache=Shared;Busy Timeout=10000" }, "Jwt": { "Key": "TaskFlow_Secret_Key_For_JWT_Authentication_2026_!@#",FlowAPI/Program.cs+3-2
FlowAPI/appsettings.json+1-1