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

Investigate why 413 error is not delivered reliably #1211

Closed
nickva opened this issue Mar 8, 2018 · 1 comment
Closed

Investigate why 413 error is not delivered reliably #1211

nickva opened this issue Mar 8, 2018 · 1 comment

Comments

@nickva
Copy link
Contributor

nickva commented Mar 8, 2018

There is a test to reproduce the issue (currently commented out):

4a73d03

Then run with:

make eunit apps=couch_replicator suites=couch_replicator_small_max_request_size_target

This is related to issue #745 but breaking it out there to focus specifically on 413 response and socket handling.

The hope was that updating Mochiweb to 2.17 would fix the socket closing race condition but it doesn't seem to be the case. The above eunit test run reproduces the issues in about 10-15 runs locally on my setup (Erlang 19, master sha: cd598d8, macOS).

nickva added a commit to cloudant/couchdb that referenced this issue Mar 23, 2018
Previously, when the server decided too much data sent with the client's
request, it would immediately send a 413 response and close the socket. The
client side kept sending incoming data as the socket was closed with unread
data in it. When this happens the connection was reset instead of going through
a regular close sequence. The client, specifically the replicator client,
detected the connection reset event before it had a chance to process the 413
response.

Fixes apache#1211
@wohali
Copy link
Member

wohali commented Mar 27, 2018

Closed by #1234.

@wohali wohali closed this as completed Mar 27, 2018
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