-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature]: Document how to increase timeout #147
Comments
Hey @tacman 👋 Looking at the stack trace, you're using Symfony's So you can try to set the framework:
http_client:
default_options:
retry_failed: true
timeout: 180
max_duration: 300 Or set it for the just the specific HTTP client: $client = new Psr18Client(
client: HttpClient::create(defaultOptions: [
'timeout' => 180,
'max_duration' => 300,
]),
); Or you could try Tip Bonus: you can also nest the clients before construction the $client = new Psr18Client(
new RetryableHttpClient(
client: HttpClient::create(defaultOptions: [
'timeout' => 180,
'max_duration' => 300,
]),
strategy: new GenericRetryStrategy(
delayMs: 3000,
multiplier: 5,
jitter: 0.25,
),
),
); I might consider updating the docs with example for If you however still think this is an issue regarding the library and/or its current implementation, then I'm more than happy to further debug the issue. To do this I would however need a reproducable example, with atleast the options to construct the |
Thanks! I don't think it's an issue of debugging, but rather as you've said, setting the client config which is specific to the client implementation. Alas, I find that part confusing, I like Symfony Contracts because I'm a bit more familiar with them. But your examples are likely what I need, I'll give them a try. Thanks. |
Indeed, that worked, thanks! Although it is client-specific, adding this to the documentation would likely be helpful to others too. |
Great to hear.
Could you clarify which options you've used and what values (and possibly the payload size for reference)? I'm normally all for updating the docs, so I will look for a place to put and format this properly then. |
After some consideration I still stand with my original point of view: the HTTP client specific options do not need to be documented here. The Symfony specific HTTP client options on how to change the Closed as not planned. |
Description
I'm trying to upload a large file, and it keeps timing out. How do I increase the timeout? I'm running from the CLI, so it shouldn't be a PHP timeout, but rather the HttpClient.
Example
No response
The text was updated successfully, but these errors were encountered: