[
https://issues.apache.org/jira/browse/COUCHDB-452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739543#action_12739543
]
Curt Arnold commented on COUCHDB-452:
-------------------------------------
Raised this issue on the mochiweb project site:
http://code.google.com/p/mochiweb/issues/detail?id=39 in addition to the
COUCHDB-394.
Mochiweb discards the value returned from gen_tcp:send, so there is not any way
to distinguish a premature close from some more significant problem.
I definitely spent some time trying to figure out why I was getting 500 return
codes in the logs on what appeared to be normal activities.
> couch logs an [error] record if a client disconnects
> ----------------------------------------------------
>
> Key: COUCHDB-452
> URL: https://issues.apache.org/jira/browse/COUCHDB-452
> Project: CouchDB
> Issue Type: Improvement
> Reporter: Mark Hammond
> Attachments: dont_log_error_on_disconnect.patch
>
>
> If a client makes a request which returns multiple rows (eg, a query) but
> disconnects before reading the response, couch logs:
> [error] [<0.66.0>] Uncaught error in HTTP request: {exit,normal}
> [info] [<0.66.0>] Stacktrace: [{mochiweb_request,send,2},
> {couch_httpd,send_chunk,2},
> {couch_httpd_view,send_json_view_row,5},
> {couch_httpd_view,'-make_view_fold_fun/6-fun-0-',12},
> {couch_view,fold_fun,4},
> {couch_btree,stream_kv_node2,7},
> {couch_btree,stream_kp_node,7},
> {couch_btree,fold,5}]
> This could lead someone to conclude couch has an error which is not correct.
> A simple [info] record recording the premature normal exit is probably more
> appropriate.
> FYI, the easiest way I found to repro this was to execute:
> % python -c "import urllib;
> urllib.urlopen('http://127.0.0.1:5984/your_db/_design/your_design_doc/_view/your_view?reduce=false').close()"
> which causes Python to open a connection and close it without reading
> anything. I'll attach a patch as suggested generally by jchris.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.