CouchDB unable to create simple view with time-out error

39 Views Asked by At

I am new to CouchDB and trying to create a view to a database.

Even with a default simple view, as shown below

function (doc) {
  emit(doc._id, 1);
}

I got a timed out error for a database with only 800 documents (total size of the database is sizes.external=800MB with sizes.actual=200MB file-size). Adding this view to a smaller database of only 4MB returned a view quickly.

here are the logs when the error was triggered

[error] 2023-11-24T04:52:16.601473Z [email protected] <0.4020.724> d4811f5123 rexi_server: from: [email protected](<0.3758.724>) mfa: fabric_rpc:map_view/5 throw:{os_process_error,{exit_status,1}} [{couch_mrview_util,get_view_index_state,5,[{file,"src/couch_mrview_util.erl"},{line$
[info] 2023-11-24T04:52:24.104869Z [email protected] <0.3682.724> -------- Starting index update for db: shards/80000000-ffffffff/dbname.1700199178 idx: _design/dbquery
[info] 2023-11-24T04:53:12.501436Z [email protected] <0.406.0> -------- couch_proc_manager <0.5169.724> died normal
[error] 2023-11-24T04:53:12.501756Z [email protected] <0.4866.724> -------- OS Process Error <0.5169.724> :: {os_process_error,{exit_status,1}}
[error] 2023-11-24T04:53:12.502285Z [email protected] emulator -------- Error in process <0.4866.724> on node '[email protected]' with exit value:
{{nocatch,{os_process_error,{exit_status,1}}},[{couch_os_process,prompt,2,[{file,"src/couch_os_process.erl"},{line,59}]},{couch_query_servers,map_doc_raw,2,[{file,"src/couch_query_servers.erl"},{line,73}]},{couch_mrview_updater,'-map_docs/2-fun-0-',3,[{file,"src/couch_mrview_updat$

I am just a little bit surprised by the scalability of CouchDB for handling a 200MB database and thought it should handle it easily. My database server is a capable, dedicated Linux server with plenty of memory and disk space.

is this result expected?

0

There are 0 best solutions below