Couchbase 2.0 keeps failing on Windows 7 x64bit and could not connect to Web Console
Hi All,
Working with Couchbase on Windows 7, my local dev machine, i keep experiencing Couchbase failures and could not connect to web console and also to couchbase through java sdk.
After reading some more webpages i found that Couchbase is very sensible at the local ip. Because i have DHCP installed on local LAN with non static ip assignment this had upset Couchbase and after initial install i've seen the problem mentioned above.
Change my ip to static local ip. I followed the workaround at this link http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic... which temporary had fixed the problem.
I started to test with Couchbase assigned some memory to the local node, and creating bucket for all the node memory allocated.
After a while i am receiving this error message:
[couchdb:error,2013-03-11T7:32:43.193,ns_1@127.0.0.1:<0.17203.6288>:couch_log:error:42]couch_set_view_group error opening set view group `_design/problems`, signature `36e11c99986bd636f9daaba64bb711e3', from set `problems`: {error,
{db_open_error,
<<"problems/765">>,
{error,
system_limit},
<<"Couldn't open database `problems/765`, reason: {error,system_limit}">>}}
Can anyone provide a fix or guide me to some docs how i can pass this problem.
You help is much appreciated.
Hi thank you for quick feed-back. It was an interesting blog. I reintalled the Couchbase, fresh and clean. I applied the fix which i had adapted the details to win 7 x64 bit, combined both unix and windows workarounds from this link http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic... .
Finally made Couchbase to work. Added some buckets (7 buckets including default) and views, one per each bucket.
To test that Couchbase is ok, i restarted the dev machine.
Surprise. Couchbase i still not restarting. Looking into logs i found this crach report:
=========================CRASH REPORT=========================
crasher:
initial call: couch_db:init/1
pid: <0.213.1>
registered_name: []
exception exit: {system_limit,
[{erlang,spawn_opt,
[proc_lib,init_p,
[<0.213.1>,
[couch_server,couch_primary_services,
couch_server_sup,cb_couch_sup,
ns_server_cluster_sup,<0.67.0>],
gen,init_it,
[gen_server,<0.213.1>,<0.213.1>,
couch_db_updater,
{<0.213.1>,<<"problems/360">>,
"c:/Program Files/Couchbase/Server/var/lib/couchbase/data/problems/360.couch.1",
<0.207.1>,[]},
[]]],
[link]]},
{proc_lib,start_link,5},
{couch_db,init,1},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}
in function gen_server:init_it/6
ancestors: [couch_server,couch_primary_services,couch_server_sup,
cb_couch_sup,ns_server_cluster_sup,<0.67.0>]
messages: []
links: [<0.221.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 377
stack_size: 24
reductions: 147
neighbours:
[error_logger:error,2013-03-11T9:39:38.435,ns_1@couchbase.dragos.com:error_logger<0.6.0>:ale_error_logger_handler:log_msg:76]Too many processes
It is there another solution for this problem or Couchbase?
I am having the same issue. I an provide all the logs if required. but it is quite serious. we are building production on couchbase and suddenly it started it happen. we need quick fix or solution.
here is the start of log file.
[ns_server:debug,2013-03-12T11:44:24.307,ns_1@GB-SLO-SVV-0167:compaction_daemon<0.1394.0>:compaction_daemon:schedule_next_compaction:1200]Finished compaction too soon. Next run will be in 30s
[couchdb:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:<0.5938.527>:couch_log:error:42]Uncaught error in HTTP request: {error,system_limit}
Stacktrace: [{erlang,spawn_link,
[erlang,apply,
[#Fun,[]]]},
{erlang,spawn_link,1},
{couch_index_merger,'-do_query_index/4-fun-2-',8},
{lists,foldr,3},
{couch_index_merger,do_query_index,4},
{couch_index_merger,query_index_loop,5},
{couch_httpd,handle_request,6},
{menelaus_web,loop,3}]
[error_logger:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:error_logger<0.6.0>:ale_error_logger_handler:log_msg:76]Too many processes
[couchdb:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:<0.23021.524>:couch_log:error:42]Uncaught error in HTTP request: {error,system_limit}
Stacktrace: [{erlang,spawn_link,
[erlang,apply,
[#Fun,[]]]},
{erlang,spawn_link,1},
{couch_index_merger,'-do_query_index/4-fun-2-',8},
{lists,foldr,3},
{couch_index_merger,do_query_index,4},
{couch_index_merger,query_index_loop,5},
{couch_httpd,handle_request,6},
{menelaus_web,loop,3}]
[couchdb:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:<0.31837.526>:couch_log:error:42]Uncaught error in HTTP request: {error,system_limit}
Stacktrace: [{erlang,spawn_link,
[erlang,apply,
[#Fun,[]]]},
{erlang,spawn_link,1},
{couch_index_merger,'-do_query_index/4-fun-2-',8},
{lists,foldr,3},
{couch_index_merger,do_query_index,4},
{couch_index_merger,query_index_loop,5},
{couch_httpd,handle_request,6},
{menelaus_web,loop,3}]
[error_logger:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:error_logger<0.6.0>:ale_error_logger_handler:log_msg:76]Too many processes
[error_logger:error,2013-03-12T11:44:48.142,ns_1@GB-SLO-SVV-0167:error_logger<0.6.0>:ale_error_logger_handler:log_msg:76]Too many processes
[error_logger:error,2013-03-12T11:44:48.861,ns_1@GB-SLO-SVV-0167:error_logger<0.6.0>:ale_error_logger_handler:log_msg:76]** Generic server file_server_2 terminating
** Last message in was {open,"/proc/meminfo",[read,binary]}
** When Server state == #Port<0.152>
** Reason for termination ==
** {system_limit,[{erlang,spawn_link,
[erlang,apply,[#Fun,[]]]},
{erlang,spawn_link,1},
{file_io_server,do_start,4},
{file_server,handle_call,3},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}
[ns_server:debug,2013-03-12T11:44:48.861,ns_1@GB-SLO-SVV-0167:<0.1318.0>:ns_pubsub:do_subscribe_link:132]Parent process of subscription {buckets_events,<0.1317.0>} exited with reason {{system_limit,
[{erlang,
spawn_link,
[erlang,
apply,
[#Fun,
[]]]},
{erlang,
spawn_link,
1},
{file_io_server,
do_start,
4},
{file_server,
handle_call,
3},
{gen_server,
handle_msg,
5},
{proc_lib,
init_p_do_apply,
3}]},
{gen_server,
call,
[file_server_2,
{open,
"/proc/meminfo",
[read,
binary]},
infinity]}}
Dragos,
8 buckets on a single node is not optimal. on smaller clusters we recommend 2-3 buckets larger cluster upto 7-8 with max of 10 buckets.
Buckets are physical containers not just logical. From a data model perspective, you should store different types of documents in the same bucket unless there is a really good reason to split it out.
haroonlatif - if you open a JIRA ticket and attach cbcollect_info logs, I can look into it further.
JIRA: http://www.couchbase.com/issues/secure/Dashboard.jspa
cbcollect_info: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-cmdli...
General: http://www.couchbase.com/wiki/display/couchbase/Working+with+the+Couchba...
Siri
Your problem is that the erlang vm reached the maximum allowed number of processes.
Good news is that this maximum value can be increased, and in 2.0.1 it should be 10 times higher than on 2.0.0:
http://www.couchbase.com/issues/browse/MB-7734
Regards
Thanks. I looked at the jira issue. couldnt find out how i can increase it. I am new to whole of this. will you please give me step by step guide. I am pretty sure it will help lot of people.
You'll need to pass +P 327680 (default is 32768) to the Erlang VM (erlsrv.exe).
I'm not familiar enough with Windows and the way Couchbase is packaged/installed on this platform, but I believe this patch will provide you useful clues:
https://friendpaste.com/lnxjTJOIq7IhwBPmR0UTv
hope it helps
Alternatively you can wait a bit until 2.0.1 for Windows is released (should be very soon), which fixes several important issues on this platform.
To apply the change Filipe has pointed out:
(a) Right click on cmd.exe and choose "Run as Administrator"
(b) Run service_unregister.bat from above
(c) Edit service_register.bat, and change the line that has the snippet:
From: .... +A 16 -env ERL_FULLSWEEP_AFTER 512 ...
To: .... +A 16 +P 327680 -env ERL_FULLSWEEP_AFTER 512 ...
(d) Run service_register.bat
However, please see Dipti's comment too, on a single node, 8 buckets is quite a lot.
Hi all,
Thank you for your good responses and yes finally after updating service_register.bat as mentioned by siri i was able to have Couchbase Server working after a restart.
Also i have combined the workround specified at the link below for windows and for linux after install to have it running.
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractic...
Thanks again and i hope that other people will benefit from this experience.
Hi All,
I've come back with a follow up for this topic which may interest the rest of the users. The fix mentioned above had worked good for several days, but after using Couchbase server and shutting down and restarting my dev machine (it was week-end !!!) for some reason the Couchbase server had remain unreachable.
Luckily my production environment is under Ubuntu 11.10 server x64 and in here stopping and restarting the machine didn't cause problems but it would be really nice to have Couchbase Server installed locally without having to keep a full VM with Couchbase inside it.
Maybe the 2.0.1 version for Windows will not have this problem.
Best regards!!!
Hi Dragos,
Perhaps the IP address assigned to the machine changed when the system was rebooted. If so, you'd need to update it again, to match the DHCP address. Assigning a static IP to the machine is a workaround.
It will be fixed in 2.0.2, and is tracked by this ticket:
http://www.couchbase.com/issues/browse/MB-7398
Best Regards,
Siri
Hi Siri,
On my machine i have assigned a static ip before installing Couchbase server. I think the problem is the erlang VM. The workaround mentioned above had worked but now i do not know what happen. I am just guessing that when i shutdown my machine maybe the Couchbase server service didn't had the chance to properly shutdown.
Still waiting for a version to be able to work with it :) .
If you're developing on a single node, you should consider reducing the number of buckets. Each Bucket represents 1024 files, and is capable of storing a lot of data, can can scale easily to several nodes. 7 buckets is a lot, and probably too much for a single node.
That said, you can increase the limits if you must, by editing service_register.bat, and changing parameters like the +P to increase the limits. Remember to unregister and reregister the service if you change the file.
Also, keep in mind that we routine test with large data sets with the default configuration, so editing this file is rarely necessary.
Take a look at this may be? http://tugdualgrall.blogspot.com/2012/12/what-to-do-if-your-couchbase-se...