SQLx long query results in Io(Kind(ConnectionAborted))

59 views Asked by At

So I have a big and complex query I run once a month, and I've just tried to rewrite the entire thing in Rust/SQLx. However I keep getting Io(Kind(ConnectionAborted)) when I run my big query.

let conn_options = MssqlConnectOptions::new()
    .database("")
    .username("")
    .password("")
    .host("")
    .port();

let pool = MssqlPoolOptions::new()
    .max_lifetime(Duration::from_secs(12000))
    .idle_timeout(Duration::from_secs(12000))
    .connect_with(conn_options)
    .await?;

This is how I do my connection, I even added max_lifetime and idle_timeout but it did not solve my problem.

let result = query("")
    .fetch_all(pool)
    .await?;

I am using SQLx 0.6.3.

Am I doing something wrong?

0

There are 0 answers