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

Ability to specify timeouts #64

Closed
robingustafsson opened this issue Jan 5, 2017 · 6 comments
Closed

Ability to specify timeouts #64

robingustafsson opened this issue Jan 5, 2017 · 6 comments
Assignees
Milestone

Comments

@robingustafsson
Copy link
Member

Being able to specify TCP connection and HTTP send/receive timeouts is important for simulating different types of clients and conditions.

I think we should add both global and local timeout options. Global options could be specified either in the "options" or using an API like options.set("tcp.connection_timeout", "100ms").

Local options could be specified at the HTTP request call site, something like http.get("http://example.com/", null, { "http.rw_timeout": "1s" }).

The cascading of the options would be options <- options API <- http API param

@liclac liclac self-assigned this Jan 5, 2017
@martinfijal
Copy link
Contributor

Also make sure we have proper defaults in place now

@robingustafsson
Copy link
Member Author

@martinfijal What is a proper default? I'm guessing you're referring to rload's default of 120s as improper 😄 Are there other tools, libs, browsers we should look at to get some kind of common default or do you have a specific number in mind?

@martinfijal
Copy link
Contributor

Unlike how rload works, I'd like one timeout for connect and one for data. I'm even happy with a hard timeout that ignores whether we are still receiving data or not (like rload), as long as it can be overridden to a higher number. 120s is good starting point :)

@robingustafsson
Copy link
Member Author

Ah right, I'd forgotten the default is shared between connect and r/w timeouts in rload (they're overridable separately though). I'd imagine it's common to have the connect timeout shorter than the r/w timeout by default?

@liclac
Copy link
Contributor

liclac commented Jan 10, 2017

Gimme some defaults and I'll make this happen. (I'd personally go for only a request timeout to keep it simple, but that's just me.)

@martinfijal
Copy link
Contributor

My suggestion as a start: Connection timeout: 60s and Read/write timeout: 120s.

@robingustafsson robingustafsson added this to the May 2017 milestone Apr 13, 2017
@liclac liclac closed this as completed in 1442603 May 11, 2017
mstoykov added a commit that referenced this issue Dec 18, 2024
* Warn on not setting binarytype

This is the first part of #35.

But even if #35 is not finished after this warning is an error we can
safely move this extension in k6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants