Hi Arek,
Have you checked the mongodb logs to determine what is taking too long ?
Generally the default timeouts used by Oak on the MongoDB connections are
correct to run Oak on MongoMK successfully. The stack trace you shared
looks like a slow query in MongoDB rather than a protocol timeout. As a
guideline, if you see MongoDB reporting slow queries in the log, then Oak
wont run successfully and the back pressure it produces will cause many
other things to go wrong with Oak internally.

There are 2 types of problem that cause slow MongoDB performance and
timeouts.
1 Incorrect or unsuitable MongoDB OS/VM deployment or configuration.
(review 10Gen documentation and fix)
2 Missing MongoDB indexes (look for the latest version of Oak which has
many fixes relative to earlier versions)
3 IO latency under the VM layer (rare, but has been reported in AWS and
other cloud providers)

If you want to analyse your MongoDB log files, good tooling can be found
here https://github.com/rueckstiess/mtools.

HTH
Best Regards
Ian




On 17 March 2017 at 10:37, Arek Kita <[email protected]> wrote:

> Hi,
>
> I have a problem with Mongo [0]. It causes timeouts. This might be due
> to MongoDB is not present at all (inaccessible) or there are rather a
> connectivity issues.
>
> How I can check and fine tune mongo connection parameters? I've
> reviewed Oak documentation [1] and codebase [2,3] but I haven't found
> anything related. I thought I could use some JVM system properties.
>
> I have finally found a way via MongoDB driver [4] but I wanted to
> double check if placing such options is a good way for Oak via OSGi
> config mongouri property?
>
> WDYT? Do you have any experience in fine-tuning MongoDB parameters?
>
> Cheers,
> Arek
>
> [0] https://gist.githubusercontent.com/kitarek/
> 4cc2611fb68d9f167bdf34fa4526072c/raw/bc9d116eb25e803b519e264e89672a
> c91303d09f/stacktrace.txt
> [1] http://jackrabbit.apache.org/oak/docs/osgi_config.html
> [2] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/document/
> DocumentNodeStoreService.java
> [3] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-
> core/src/main/java/org/apache/jackrabbit/oak/plugins/
> document/DocumentNodeStore.java
> [4] https://docs.mongodb.com/manual/reference/connection-string/
>

Reply via email to