Cbes as a service


#1

Hi,
Since the version 4 connector is a standalone, am i suppose to run it as a console application ?? can it be installed as a windows service ?
If not, how can I be sure that it is running ? do i need to ping the metrics server and make sure it is on-line ??


#2

Hi Isreal,

You’re right, it’s probably best to run the connector as a service. Even when running as a service it might be good to ping the metrics and and check the cbes.esWaitMs gauge to make sure the ES indexing requests are completing in a reasonable amount of time.

The discussion in CBES-111 includes a systemd script you can use as a starting point on Linux.

The ES connector is not supported under Windows; it might work, but it’s completely untested.

If you want to forge ahead anyway, StackOverflow has some ideas for running a BAT file as a Windows service.

Thanks,
David


#3

Hi David and thanx for the reply,
I will switch to Linux, it’s in my road map :slight_smile: but just wanted to know if you are aware about the CPU issue when running on windows ? After few hours it gets to 90% and only restart of the connector solves it…


#4

@israelolcha would you be able to run a profiler on it like Java Flight Recorder when the problem happens so we can see what is taking so much CPU?


#5

Ill be happy to help, Can you please guide me how to do that ? I’m more of a C# guy :slight_smile:


#6

Does this only happen when the connector is busy indexing documents, or can you reproduce it just by letting the connector sit idle?


#7

cbes.zip (63.8 KB)
Hi,
The couchbase is a testing environment and is barely used…
Most of the time I see messages for closing non used sockets and than creating them again…
I attached the last log file of the connector , maybe you can find something there with all the metrics errors logged.
For now, I disabled the metrics collection and will check tomorrow again.
Oh, CPU got to 95%, the machine is barely breathing :sweat_smile: