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

cannot read body: context deadline exceeded #169

Open
jonathan-mothership opened this issue Jul 1, 2024 · 2 comments
Open

cannot read body: context deadline exceeded #169

jonathan-mothership opened this issue Jul 1, 2024 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jonathan-mothership
Copy link

algolia version 1.6.11

algolia objects browse shipments > algolia-shipments.jsonl
cannot read body: context deadline exceeded

We can't seem to pull our indexes down locally with the browse function and not sure if there's a timeout setting that can used to adjust this.

Some of the index manages to come down, in some cases hundreds of megabytes, but never a successful download of the index.

@jonathan-mothership
Copy link
Author

I was also not able to succeed by setting the page size to a low value:

 algolia objects browse shipments --hitsPerPage 20  > algolia-shipments.jsonl

Got ~300MB down but still ended up with the same error

cannot read body: context deadline exceeded

@clemfromspace
Copy link
Collaborator

clemfromspace commented Jul 22, 2024

Hi @jonathan-mothership and thanks for your report.

Your issue might come from the read timeout parameter, used by the Go API Client which the CLI rely on. The read timeout default value is 5 seconds.

There is currently no way to configure this timeout in the CLI, but this is definitely something we could implement in a future release. In the mean time, in order to confirm the source of your issue, will you be able to build the CLI locally?

If that's the case, you will have to add the following change in this file

clientCfg := search.Configuration{
			AppID:          appID,
			APIKey:         APIKey,
			ExtraUserAgent: fmt.Sprintf("Algolia CLI (%s)", appVersion),
			Hosts:          f.Config.Profile().GetSearchHosts(),
+                       ReadTimeout: 10 * time.Second
		}

Let me know if that helps.

@clemfromspace clemfromspace added bug Something isn't working question Further information is requested labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants