We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy

The initialization appears to be somewhat inconsistent regarding the time required for the app to become available.
Sometimes the deployment runs "smoothly" and sometimes the app fails to start (in a reasonable time interval).

The initialization seems to freeze at a certain point which appears in the logs as [1]. The actual service isn't started (lsof -i -n -P doesn't return any processes using port 1026).
I use standard health-checks which, basically, do a curl localhost:1026/version. I've tried modifying the timeouts and also the delay time from which the probe fires. Not even with 360sec (6 minutes) delay do I reach consistent deployments!

I've tested with different resource allocation and this doesn't seem to be the problem.

Also by checking the logs I see some "odd" intervals in the initialization procedure. I have some excerpts at the end of the message, [2], where I can see the last steps of the init procedure being executed(or, at least, logged) at precisely 1 minute intervals.

The problem is that once the readiness health check fails, the deployment fails as well. Orion seems to use a lot of RAM which does not get released even if the notification load disappears, from what I saw. The recommendation would be to restart the process, which, in my case, can be automatically handled if I set an upper memory limit for the container. So the initialization process comes again in question...also for the auto-scaling mechanism, etc.

Any hints towards how to solve this problem would be much appreciated!

My configuration is quite similar. I use a custom build where I simply add a wrapper script to start the main process. This serves as a more convenient way to configure different startup arguments for the main process.
The script:

The excerpt above uses some parameters that reference a ConfigMap - ORION_CONF and a Secret - MONGODB_ENV(OKD objects; given your reply I imagine you are familiar with them), but the deployed Pod ends up starting with pretty much the same arguments. The ORION_EXTRA_ARGS env var holds all the startup arguments that I've mentioned in the initial mail and that, I see, you use in your test.
I don't use an exec in my startup script so that PID 1 of the container would actually go to the contextBroker process. Will have to try this (ss noted in the last github comment by Fermin Marquez).
Again, as mentioned in the github discussion I have switched to 3.6 version of Mongo, but this hasn't led to an improvement in my case.

The problem I have is that sometimes, just like in your test example, the serrvice starts without any problems/right away and sometimes the initialization process gets stuck, the process doesn't begin listening on the 1026 port so it practically doesn't begin to run.
What I found is that there's precisely the same step where the init process arrives during failed inits: