A larger database pool on Postgres #200

Closed
opened 2026-10-11 13:26:13 -07:00 by rays · 1 comment
Owner

ipx keeps sqlx's default of 10 connections on Postgres (src/db.rs, connect). A page load asks for dozens of covers through /api/art at once, each with a lookup, and a scan fetches several feeds side by side, so bursts open all ten. In use stayed at 2 or below at every scrape on 2026-10-11, but a 15 s scrape misses a burst of milliseconds. The server allows 100 connections (max_connections in /mnt/fast/appdata/postgres/postgresql.conf) and about 13 were open across all its clients, ipx's 10 among them, so 20 leaves plenty for the other apps. Asked for by the user.

ipx keeps sqlx's default of 10 connections on Postgres (src/db.rs, connect). A page load asks for dozens of covers through /api/art at once, each with a lookup, and a scan fetches several feeds side by side, so bursts open all ten. In use stayed at 2 or below at every scrape on 2026-10-11, but a 15 s scrape misses a burst of milliseconds. The server allows 100 connections (max_connections in /mnt/fast/appdata/postgres/postgresql.conf) and about 13 were open across all its clients, ipx's 10 among them, so 20 leaves plenty for the other apps. Asked for by the user.
rays added the enhancement label 2026-10-11 13:26:13 -07:00
Author
Owner

Done in c28accb: 20 connections on Postgres (SQLite stays at 8). Deployed; /metrics shows ipx_db_connections_max 20.

Done in c28accb: 20 connections on Postgres (SQLite stays at 8). Deployed; /metrics shows ipx_db_connections_max 20.
rays closed this issue 2026-10-11 13:28:29 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#200