Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

If you make BigCouch angry it stops speaking valid http (problem with error handling) #125

@kowalski

Description

@kowalski

I run into this problem, after I have rebuild the 'make dev' and forgto to configure the view server for python. When I query the view I get 500 response, which is perfectly fine. The problem is that BigCouch doesn't stop at responding to this request one it sends more responses, which confuses the http client.

Here is the dump of the http channel I did the ilegal stuff:

< GET /testqueryingviews/_design/feat/_view/some_view?reduce=false HTTP/1.1
< Host: localhost
< Accept: application/json
< 
> HTTP/1.1 500 Internal Server Error
> X-Couch-Request-ID: 0635d75f
> Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
> Date: Tue, 05 Feb 2013 11:48:25 GMT
> Content-Type: application/json
> Content-Length: 53
> Cache-Control: must-revalidate
> 
> {"error":"unknown_query_language","reason":"python"}
HTTP/1.1 500 Internal Server Error
X-Couch-Request-ID: 0635d75f
Server: CouchDB/1.1.1 (Erlang OTP/R14B04)
Date: Tue, 05 Feb 2013 11:48:25 GMT
Content-Type: application/json
Content-Length: 170
Cache-Control: must-revalidate

{"error":"function_clause","reason":null,"stack":["chttpd:end_delayed_json_response/1","chttpd:handle_request/1","mochiweb_http:headers/5","proc_lib:init_p_do_apply/3"]}
> HTTP/1.1 500 Internal Server Error

The part from where the first response body begins until the end of second reply seems to be delivered in one tcp packet. After that, bigcouch starts to send the third 500 response, at which point my http client is dazed and confused and disconnects.

I attach the full dump of my test to this report, just in case the previous requests are important to reproduce it.
This issue has been discovered at revision 73f530a which is the tip of master atm.

EDIT: you can't actually attach text files of github. Thats odd... Here is the full dump of my test: http://pastebin.com/u2ggBT6Y

EDIT2: This is the output of on big couch console: http://pastebin.com/7M3yLJVm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions