Fix exception 'No message received'#4856
Merged
alexey-milovidov merged 1 commit intomasterfrom Mar 29, 2019
Merged
Conversation
This was referenced Mar 29, 2019
Contributor
|
Nice debug :) there is still a very small chance that connection will be in close wait if this check succeeds, time drift/vm pauses. Negligible to some degree :) |
|
Hi. I'm wondering if you may have considered this actually to be a bug in Poco? The Poco docs say nothing about only being able to send data over an HTTPClientSession object when the underlying socket is in a given state. In fact, I'd think this Poco class should be able to handle this situation, especially when using HTTP/1.1 keepalive persistent connections. I say this because I've seen the same problem in a project I'm working on that uses Poco. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
For changelog. Remove if this is non-significant change.
Category (leave one):
Short description (up to few sentences):
Fix
No message receivedexception in replication.Detailed description:
Default server
keep_alive_timeoutis 3 seconds https://github.com/yandex/ClickHouse/blob/master/dbms/programs/server/config.xml#L88. But default Poco HTTPClientSession timeout is 8 seconds https://github.com/ClickHouse-Extras/poco/blob/d0271f990869b7f23dac4bb2ee0c127cf815f077/Net/include/Poco/Net/HTTPClientSession.h#L269. Server closes connection in three seconds, but client session tries to reconnect after 8 seconds https://github.com/ClickHouse-Extras/poco/blob/d0271f990869b7f23dac4bb2ee0c127cf815f077/Net/src/HTTPClientSession.cpp#L403. If we make request in interval between (3, 8] seconds after previous we will try to write inCLOSE_WAITsocket and exceptionNo message receivedwill be thrown.Closes: #4047