@Gargron We tried setting the statement_timeout via the database.yml config. It did not work with pg_bouncer. I looked into the rails code (github.com/rails/rails/blob/v5), and that seems to call SET SESSION ..
Reading the feature map on pgbouncer.org/features.html, that will not work when using transaction pooling mode.