
Databases - Postgresql - Gitea and PGBouncer
Fixing Gitea 500 Errors with PostgreSQL + pgBouncer: The Prepared Statements Trap If you've ever stared at random 500 Internal Server Errors in Gitea — especially on repo views, commit pages, PR lists, or pretty much any action — and your logs are full of cryptic PostgreSQL driver errors like these: pq: bind message supplies 3 parameters, but prepared statement "" requires 18 pq: invalid input syntax for type bigint: "confdroid" pq: bind message supplies 1 parameters, but prepared statement "" requires 2 Repo.GetTopLanguageStats, pq: bind message has 7 result formats but query has 6 columns ...and you're running Gitea (in my case 1.25.4) behind pgBouncer on port 6432 (the classic tell), then congratulations: you've hit one of the most frustrating compatibility gotchas in the Postgres ecosystem. The Symptoms Errors happen intermittently but frequently across almost all UI actions. Debug/Trace logging in Gitea shows nothing helpful at first — just stack traces pointing to XORM queries. O
Continue reading on Dev.to
Opens in a new tab


