Skip to content

Conversation

@HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Jul 8, 2025

What does this PR do?

This PR adds a custom configuration that lets developers configure the named pipe connection timeout for the Docker client. Some developers noticed that calling (many) APIs in parallel (at once) on Podman (Desktop for Windows) could lead to errors like:

System.TimeoutException : The operation has timed out.

With this change, developers can adjust the timeout as needed by setting the env var TESTCONTAINERS_NAMED_PIPE_CONNECTION_TIMEOUT or the properties file configuration named.pipe.connection.timeout to a string representation of a TimeSpan (e.g. to 00:00:05). Also, the default timeout has been increased from 100ms to 1s.

Why is it important?

This reduces the number of errors and exceptions developers might run into.

Related issues

Follow-ups

  • As a follow-up, we should take a closer look at the Docker.DotNet implementation and check what areas we can improve. IIRC Docker.DotNet recreates the connection on every call. If we can keep the connection open instead, this could significantly improve the overall performance.

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Jul 8, 2025
@netlify
Copy link

netlify bot commented Jul 8, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 8e36082
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/686d5f6686e3260008f768da
😎 Deploy Preview https://deploy-preview-1480--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@HofmeisterAn HofmeisterAn merged commit 6bc8cc6 into develop Jul 9, 2025
72 checks passed
@HofmeisterAn HofmeisterAn deleted the feature/named-pipe-connection-timeout-custom-configuration branch July 9, 2025 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TimeoutException when sending many concurrent API requests to Podman

2 participants