Cbes as a service

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 ??

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

1 Like

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…

@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?

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

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

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:

Hi Israel,

Thanks for the logs!

The “Closing dead connection” messages are probably due to JDCP-117. Fixed in version 4.0.1 of the ES connector which was recently released. The CPU usage issue may be related.

I also see lots of timeout exception in there… I’m a bit more worried about those. Can you try again with version 4.0.1 and let us know how it goes?

Thanks,
David

Sure, Just update the connector to 4.0.1 will update you tomorrow

Hey,
Issue solved, no more High CPU with version 4.0.1.
I enabled the metrics so will verify its all good tomorrow.

Thank you very much

1 Like