sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

Question: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Open ghstahl opened this issue 2 years ago • 1 comments

Windows 11:

I am doing a load test and am getting the following error: Only one usage of each socket address (protocol/network address/port) is normally permitted.

My naive implementation is taken right from your readme.md where I create a new client per request.

c, err := cloudevents_sdk_go.NewClient(p, cloudevents_sdk_go.WithTimeNow(),
		cloudevents_sdk_go.WithUUIDs(),
	)

I have tried to cache the http.Client and use.

	options = append(options, cloudevents_sdk_go_protocol_http.WithClient(*s.HttpClientContainer.Client))

where my client has a ptr to the transport.

I have tried caching the RoundTripper transport;

	options = append(options, cloudevents_sdk_go_protocol_http.WithRoundTripper(s.HttpClientContainer.RoundTripper))

Can you give me any advise that will not exhaust ports under a load test?

Thanks

ghstahl avatar Jun 28 '22 01:06 ghstahl

@slinkydeveloper created the loadtest, maybe he can weigh in here?

n3wscott avatar Jun 30 '22 16:06 n3wscott