Error : body_too_large,content_length (MaxBodyLength)

When I try to save more than 1.3Mb json document, the following error occurs:

[ns_server:error,2015-04-15T16:50:44.524,ns_1@192.168.0.51:<0.9975.0>:menelaus_web:loop:170]Server
error during processing: [“web request failed”,
{path,
"/pools/default/buckets/ProjectData/docs/pd_npc"},
{type,exit},
{what,{body_too_large,content_length}},
{trace,
[{mochiweb_request,stream_body,5,
[{file,

“/home/buildbot/buildbot_slave/centos-6-x64-301-builder/build/build/couchdb/src/mochiweb/mochiweb_request.erl”},
{line,255}]},
{mochiweb_request,recv_body,2,
[{file,

“/home/buildbot/buildbot_slave/centos-6-x64-301-builder/build/build/couchdb/src/mochiweb/mochiweb_request.erl”},
{line,206}]},
{menelaus_web_crud,handle_post,3,
[{file,“src/menelaus_web_crud.erl”},
{line,188}]},
{request_throttler,do_request,3,
[{file,“src/request_throttler.erl”},
{line,59}]},
{menelaus_web,loop,2,
[{file,“src/menelaus_web.erl”},
{line,149}]},
{mochiweb_http,headers,5,
[{file,

“/home/buildbot/buildbot_slave/centos-6-x64-301-builder/build/build/couchdb/src/mochiweb/mochiweb_http.erl”},
{line,94}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},{line,239}]}]}]

What is the solution?
Thanks.

What method are you using to try to save this large document? The web UI isn’t really intended for these kinds of large items. Is that what you’re using?

I might recommend the “cbc” command line tool included with libcouchbase if you need a simple method for storing large documents.

I have used the web console for storage.

While this method of storing dividing the document, planners who are not familiar with computer use is not recommended to use the “cbc”.

That may be, but our web console isn’t really a webapp for manipulating data except in light usage. It’s designed for administrators.

You might be best off picking up one of the SDKs and writing a small webapp for working with larger size documents. Each one has a tutorial that will help you.

Is there any way I can increase the document size limit(MaxBodyLength)?

Thanks,
ingenthr.

There is not a very practical way, no. You’re probably talking about only a 20 minute coding project with Spring Boot or node.js.

You may consider the CLI tool to be a more practical way, but the reality is that plenty of couch base admins (including myself) use the web interface exclusively. There should be a way to override that setting, with the ‘at your own risk’ warning present if you prefer.

I spent 20 mins messing a customer around because I couldn’t modify a ‘saved’ document, without any message from the UI other than a 500 error in my javascript console. I thought that CouchBase was just freaking out on me.

If you can upload a 5gb file to S3 via a browser, you can push a 1.3MB JSON to couch base through it too. Let the users decide what they want to use.