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

Hey complains when it receives 503s. #185

Open
bushidocodes opened this issue Apr 12, 2021 · 3 comments
Open

Hey complains when it receives 503s. #185

bushidocodes opened this issue Apr 12, 2021 · 3 comments

Comments

@bushidocodes
Copy link
Contributor

When running hey, 503s result in the following being logged:

Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 503 Service Unavailable\r\n\r\n"; err=<nil>

It is unclear if this is expected behavior or an indication that we are not properly sending 503s.

Run ./runtime/experiments/premption/run.sh to recreate

@emil916 emil916 reopened this May 23, 2022
@emil916
Copy link
Contributor

emil916 commented May 23, 2022

I am still getting these errors on the client side. Not with 503 though, but mostly with 429 (Admissions Controller denying a requrest) and sometimes with 409 (shedding [killing] a work in the global queue to make some cpu util for a guaranteed request).

@bushidocodes
Copy link
Contributor Author

bushidocodes commented May 23, 2022

Does the hey -disable-keepalive option make a difference? This is an HTTP feature we don't support. This is related to the Connection: close header in the following:

#define HTTP_RESPONSE_429_TOO_MANY_REQUESTS  \
	"HTTP/1.1 429 Too Many Requests\r\n" \
	"Server: SLEdge\r\n"                 \
	"Connection: close\r\n"              \
	"\r\n"

I'd also be curious if this happens to be an HTTP HEAD request.

A comment here suggests that it might be because we write a response before reading the entire HTTP request:

"Basically it means that the upstream server either responded with data before the HTTP request was finished, or it continued to respond with data after it was meant to stop (already wrote the full content length's worth of bytes?)"

@emil916
Copy link
Contributor

emil916 commented May 23, 2022

Does the hey -disable-keepalive option make a difference?

Nope. I use hey with that option by default.

I'd also be curious if this happens to be an HTTP HEAD request.

I am curious why it happens only a few times, not for all the requests.

"Basically it means that the upstream server either responded with data before the HTTP request was finished, or it continued to respond with data after it was meant to stop (already wrote the full content length's worth of bytes?)"

Yeah I saw that. Not getting how it is happening in Sledge though :/

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

2 participants