Skip to content

per query timeouts not respected #162

@Wijnand

Description

@Wijnand

When running "ALTER TABLE" queries on a large table I discovered the given timeout was not respected. After 5 seconds I got an error: Mariaex.Protocol (#PID<0.3419.0>) disconnected: ** (Mariaex.Error) [tcp] recv failed with: :timeout

I did not try it with a direct connection to Mariaex, in this case I perform the queries via Ecto (and thus DBConnection).
Ecto.Adapters.SQL.query!(MyApp.Repo, "select sleep(6)", [], timeout: 7000)

I traced the given timeout option through ecto and db_connection, but MariaEx.Protocol is where its get lost., in handle_execute to be precise.

I don't know what the correct solution should be so I have no pull request for you, sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions