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 am new to sqlx , When I using sqlx in my project.
let mut conn = pool.try_acquire();
let get_conn_time = std::time::Instant::now();
while conn.is_none() {
tokio::time::sleep(Duration::from_millis(100)).await;
// don't even try.
if sender.is_closed() {
return;
}
conn = pool.try_acquire();
if conn.is_none() && get_conn_time.elapsed() > Duration::from_secs(10) {
tracing::warn!(
"after {:?} still can't get conn: sql:{} connection size:{} idle:{}",
get_conn_time.elapsed(),
load_data_sql.as_str(),
pool.size(),
pool.num_idle()
);
}
if conn.is_none() && get_conn_time.elapsed() > Duration::from_secs(60) {
let _ = sender.send(Err(datafusion::error::DataFusionError::Internal(
"can't get pgsql conn".to_string(),
)));
return;
}
}
I can't acquire new connection.
2024-01-16T05:45:49.796829Z WARN ThreadId(16) runtime.spawn{kind=task task.name= task.id=67784 loc.file="src/core/query/src/datasource/table_provider/external_view/mysql_table.rs" loc.line=188 loc.col=13}: src/core/query/src/datasource/table_provider/external_view/mysql_table.rs:199: after 40.746810864s still can't get conn: sql:select `CTLG_ID` as `CTLG_ID`,`NAME` as `NAME`,`DESC` as `DESC`,`LOCATION_URI` as `LOCATION_URI`,`CREATE_TIME` as `CREATE_TIME` from `CTLGS` connection size:0 idle:0
you see the size is 0 ,is this mean sqlx can't establish new connection??
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
-
I am new to
sqlx
, When I using sqlx in my project.I can't acquire new connection.
you see the size is
0
,is this mean sqlx can't establish new connection??Beta Was this translation helpful? Give feedback.
All reactions