fix: harden deepseek official remote43 import closure
This commit is contained in:
@@ -44,6 +44,11 @@ func Open(ctx context.Context, dsn string) (*DB, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("open sqlite database: %w", err)
|
||||
}
|
||||
// SQLite only tolerates a single writer at a time. Pin the pool to one
|
||||
// connection so HTTP flows that chain several writes (for example host
|
||||
// probe refresh + import persistence) do not self-deadlock into SQLITE_BUSY.
|
||||
sqlDB.SetMaxOpenConns(1)
|
||||
sqlDB.SetMaxIdleConns(1)
|
||||
|
||||
if err := sqlDB.PingContext(ctx); err != nil {
|
||||
_ = sqlDB.Close()
|
||||
|
||||
Reference in New Issue
Block a user