You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been spending quite bit of time trying to figure out why my sqlx code is giving me a PoolTimedOut error. It's just code for obtaining a connection from the pool.
pub async fn setup_pg_pool(postgres_url: &str) -> Result<sqlx::Pool<Postgres>, MigrationError> {
let pool = PgPoolOptions::new()
.acquire_timeout(std::time::Duration::from_secs(30))
.max_connections(5)
.connect(postgres_url)
.await?;
Ok(pool)
}
This is being used for a lambda function in AWS. Diesel, another database library, works fine. What's strange is that the code shown above runs fine in another rust program (no boilerplate lambda code) in a bastion host which has access to the same database. Anybody have tips or suggestion on how to debug this issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've been spending quite bit of time trying to figure out why my sqlx code is giving me a PoolTimedOut error. It's just code for obtaining a connection from the pool.
This is being used for a lambda function in AWS. Diesel, another database library, works fine. What's strange is that the code shown above runs fine in another rust program (no boilerplate lambda code) in a bastion host which has access to the same database. Anybody have tips or suggestion on how to debug this issue?
Beta Was this translation helpful? Give feedback.
All reactions