Skip to content

Commit cf808be

Browse files
committed
coa-updater: Increase timeouts
1 parent 0c97f6e commit cf808be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/coa-updater/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ const poolParams = {
1515
password: process.env.MYSQL_ROOT_PASSWORD,
1616
multipleStatements: true,
1717
permitLocalInfile: true,
18+
// Prevent "socket has unexpectedly been closed" during long LOAD DATA operations
19+
// (inducks_entry is large; default net_read_timeout/net_write_timeout is 60s)
20+
sessionVariables: {
21+
net_read_timeout: 1800, // 30 minutes
22+
net_write_timeout: 1800, // 30 minutes
23+
wait_timeout: 3600, // 1 hour
24+
},
1825
};
1926
const pool = createPool(poolParams);
2027

0 commit comments

Comments
 (0)