Spaces:
Running
Running
Commit ·
977fb40
1
Parent(s): f21fc8a
fix: revert to stable SQLite settings and enforce 5MB payload limit to prevent disk I/O errors
Browse files- FlowAPI/Program.cs +3 -4
FlowAPI/Program.cs
CHANGED
|
@@ -47,7 +47,7 @@ namespace FlowAPI
|
|
| 47 |
// --- SignalR ---
|
| 48 |
builder.Services.AddSignalR(options =>
|
| 49 |
{
|
| 50 |
-
options.MaximumReceiveMessageSize =
|
| 51 |
options.EnableDetailedErrors = true;
|
| 52 |
});
|
| 53 |
|
|
@@ -136,12 +136,11 @@ namespace FlowAPI
|
|
| 136 |
|
| 137 |
db.Database.Migrate();
|
| 138 |
|
| 139 |
-
//
|
| 140 |
using (var command = db.Database.GetDbConnection().CreateCommand())
|
| 141 |
{
|
| 142 |
db.Database.OpenConnection();
|
| 143 |
-
|
| 144 |
-
command.CommandText = "PRAGMA journal_mode=MEMORY; PRAGMA synchronous=OFF; PRAGMA locking_mode=EXCLUSIVE; PRAGMA temp_store=MEMORY; PRAGMA cache_size=-20000;";
|
| 145 |
command.ExecuteNonQuery();
|
| 146 |
}
|
| 147 |
|
|
|
|
| 47 |
// --- SignalR ---
|
| 48 |
builder.Services.AddSignalR(options =>
|
| 49 |
{
|
| 50 |
+
options.MaximumReceiveMessageSize = 5 * 1024 * 1024; // 5MB limit
|
| 51 |
options.EnableDetailedErrors = true;
|
| 52 |
});
|
| 53 |
|
|
|
|
| 136 |
|
| 137 |
db.Database.Migrate();
|
| 138 |
|
| 139 |
+
// Set journal mode to TRUNCATE for stability on Docker/Cloud filesystems
|
| 140 |
using (var command = db.Database.GetDbConnection().CreateCommand())
|
| 141 |
{
|
| 142 |
db.Database.OpenConnection();
|
| 143 |
+
command.CommandText = "PRAGMA journal_mode=TRUNCATE; PRAGMA synchronous=NORMAL; PRAGMA locking_mode=NORMAL; PRAGMA temp_store=MEMORY;";
|
|
|
|
| 144 |
command.ExecuteNonQuery();
|
| 145 |
}
|
| 146 |
|