Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

db defaults

Dane Schneiderb7273031a411
diff --git a/app/server/db/db.go b/app/server/db/db.go
index 66e3eeb4..8a6dc038 100644
--- a/app/server/db/db.go
+++ b/app/server/db/db.go
@@ -17,7 +17,7 @@ import (
var Conn *sqlx.DB
-const LockTimeout = 2000
+const LockTimeout = 4000
const IdleInTransactionSessionTimeout = 90000
const StatementTimeout = 30000
@@ -55,11 +55,11 @@ func Connect() error {
log.Println("connected to database")
if os.Getenv("GOENV") == "production" {
- Conn.SetMaxOpenConns(500)
- Conn.SetMaxIdleConns(100)
+ Conn.SetMaxOpenConns(50)
+ Conn.SetMaxIdleConns(20)
} else {
- Conn.SetMaxOpenConns(250)
- Conn.SetMaxIdleConns(50)
+ Conn.SetMaxOpenConns(10)
+ Conn.SetMaxIdleConns(5)
}
// Verify settings