是否可以为CouchDB设置较低的堆大小,以防止出现“无法分配内存”错误?

cer*_*cem 5 erlang couchdb out-of-memory

当我需要相对大的视图时,CouchDB(提交:b029b67)由于“内存不足”而死:

[info] 2017-01-03T16:28:35.523858Z couchdb@localhost <0.756.0> -------- Starting index update for db: shards/00000000-1fffffff/mydb.1483425014 idx: _design/orders
[info] 2017-01-03T16:28:35.523989Z couchdb@localhost <0.754.0> -------- Starting index update for db: shards/80000000-9fffffff/mydb.1483425014 idx: _design/orders
[info] 2017-01-03T16:28:35.524235Z couchdb@localhost <0.755.0> -------- Starting index update for db: shards/c0000000-dfffffff/mydb.1483425014 idx: _design/orders
[info] 2017-01-03T16:28:35.944351Z couchdb@localhost <0.741.0> -------- Opening index for db: shards/e0000000-ffffffff/mydb.1483425014 idx: _design/orders sig: "25d074b71c60188a31fca87891ee036c"
[info] 2017-01-03T16:28:35.944894Z couchdb@localhost <0.780.0> -------- Starting index update for db: shards/e0000000-ffffffff/mydb.1483425014 idx: _design/orders
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed

Crash dump was written to: erl_crash.dump
eheap_alloc: Cannot allocate 127744576 bytes of memory (of type "heap", thread 2).
Aborted
Run Code Online (Sandbox Code Playgroud)

这是CouchDB关闭时我的RAM状态:

             total       used       free     shared    buffers     cached
Mem:       4148228    1048880    3099348      18412      10048     834928
-/+ buffers/cache:     203904    3944324
Swap:      7812092      12944    7799148
Run Code Online (Sandbox Code Playgroud)

这是./etc/local.ini(我发现相关):

[couchdb]
os_process_timeout = 240000

[query_server_config]
os_process_limit = 130000
Run Code Online (Sandbox Code Playgroud)

CouchDB需要如此数量的RAM是否正常,还是我可以更改的配置有误?