Commit 5cae909
Add pool pre-ping check and max_lifetime=300 to AsyncConnectionPool
Adds check=AsyncConnectionPool.check_connection to detect and discard
dead connections before use (equivalent to pool_pre_ping=True), and
max_lifetime=300 to recycle connections older than 5 minutes (equivalent
to pool_recycle=300). This fixes SSL connection closure errors on
NeonDB's free tier.
Co-authored-by: MattiaFailla <11872425+MattiaFailla@users.noreply.github.com>1 parent 095ebb4 commit 5cae909
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
0 commit comments