-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
random fail response from server #261
Comments
After further testing, I found that it's caused by ReadTimeout/WriteTimeout of fasthttp.Server
If I set ReadTimeout to 1.5 second on my test machine, It's no problem. But if set to less than 1.5 sec, such as 1 sec, there would be some random fail response. Is there any additional config that I should do to use ReadTimeout/WriteTimeout of fasthttp.Server? |
The op
|
That’s why I removed coarse time from my fork: erikdubbelboer@05f8f96 (which contains many other fixes as well) |
It is not clear why @valyala introduced this coarse time. Benchmarks on different systems show that the speedup is no where enough to justify the added code complexity and bugs it seems to have introduced. Mac: BenchmarkCoarseTimeNow-8 2000000000 2.49 ns/op 0 B/op 0 allocs/op BenchmarkTimeNow-8 500000000 3.14 ns/op 0 B/op 0 allocs/op Ubuntu: BenchmarkCoarseTimeNow-4 300000000 6.74 ns/op 0 B/op 0 allocs/op BenchmarkTimeNow-4 100000000 15.9 ns/op 0 B/op 0 allocs/op This reverts commit 6309f42 and 32c72cd. See: valyala#271, valyala#269 and valyala#261.
I'm using fasthttp + fasthttprouter.
Go 1.8.1
fasthttp version: b154429
fasthttprouter version: ade4e2031af3aed7fffd241084aad80a58faf421
After I update fasthttp from some old version to the current version, I get random failure response from server.
curl: (52) Empty reply from server
curl: (56) Failure when receiving data from the peer
fasthttprouter hasn't been updated for quite some time.
The text was updated successfully, but these errors were encountered: