Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client.Timeout exceeded while awaiting headers #108

Open
Chaho12 opened this issue Mar 20, 2024 · 0 comments
Open

Client.Timeout exceeded while awaiting headers #108

Chaho12 opened this issue Mar 20, 2024 · 0 comments

Comments

@Chaho12
Copy link
Member

Chaho12 commented Mar 20, 2024

I notice that I get this error when my coordinator is in heavy load while reading data in rows.Next(). Is there a timeout while fetching rows.Next?

  • I assume that there is issue while getting response from coordinator.
trino: query failed (0 ): "Get \"https://trino_url/v1/statement/executing/20240318_081907_03546_ch76y/y269bf9b085430f6e7d0222f3d8f2dc7309a9fdc9/1426\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

My trinoclient is using retryable, and new Client uses default httpclient with default poold transport setting.

	retryClient := retryablehttp.NewClient()
	retryClient.Logger = nil
	TrinoClient = retryClient.StandardClient()
    defer rows.Close()
    if rows != nil {
        ....
        for rows.next() { 
            ...
            err := rows.Scan(results...)
            ...
        }
        err = rows.Err()
	if err != nil {
	    return err <-- error is logged here.
	}
    }

So, I was wondering is setting http.ClientTimeout recommded? or at least is it ok to set timeout? I couldn't find anything on timeout part.

I thought that if i don't set it, timeout is infinite and no error is responded.
This doesn't seem to work with retryable library, as it retries only on connection/server errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant