Skip to content

vminitd (client): Turn off idle timeout#680

Merged
dcantah merged 1 commit intoapple:mainfrom
dcantah:rm-idletimeout
Apr 13, 2026
Merged

vminitd (client): Turn off idle timeout#680
dcantah merged 1 commit intoapple:mainfrom
dcantah:rm-idletimeout

Conversation

@dcantah
Copy link
Copy Markdown
Member

@dcantah dcantah commented Apr 13, 2026

Closes: #678

There's no reason to have an idle timeout per connection as users may use this library in many different ways. The grpc lib defaults to a 30 min idle timeout which could be trivially reached if instead of waiting on the init process, you were waiting on a bunch of execs. NIO under the hood asserts on ebadfs (which is good, but bad for this scenario..), so lets turn off the timeout altogether.

There's no reason to have an idle timeout per connection as users
may use this library in many different ways. The grpc lib defaults
to a 30 min idle timeout which could be trivially reached if instead
of waiting on the init process, you were waiting on a bunch of execs.
NIO under the hood asserts on ebadfs (which is good, but bad for this
scenario..), so lets turn off the timeout altogether.
Copy link
Copy Markdown
Contributor

@jglogan jglogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also configure the client.

.withConnectedSocket(connection.fileDescriptor).wait()
let transport = HTTP2ClientTransport.WrappedChannel.wrapping(
channel: channel,
config: .defaults { $0.connection.maxIdleTime = nil }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what this change is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I thought I was looking at the server code, my bad.

@dcantah dcantah changed the title vminitd: Turn off idle timeout vminitd (client): Turn off idle timeout Apr 13, 2026
.withConnectedSocket(connection.fileDescriptor).wait()
let transport = HTTP2ClientTransport.WrappedChannel.wrapping(
channel: channel,
config: .defaults { $0.connection.maxIdleTime = nil }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I thought I was looking at the server code, my bad.

@dcantah dcantah merged commit 833b07f into apple:main Apr 13, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

[Bug]: Frequent crashes due to vsock

2 participants