In discussions with customers, we have found that oftentimes customers will want to leverage OverOps to monitor quite short-lived applications as opposed to monitoring long running applications as a specific use case to reap such benefits as those mentioned above.
I’m referring here to application processes with lifetimes of under 10 seconds. Such short-lived processes can start and exit before the OverOps micro-agent (running embedded inside the monitored process) has had enough time to initialize itself, and perform necessary actions such as establishing a connection with the OverOps collector process with which the OverOps agent must communicate.
This can result for example in the following error when using the OverOps Jenkins Plugin for such a monitored process:
java.lang.IllegalStateException: Deployments […] not found. Please ensure your collector and Jenkins configuration are pointing to the same environment.
We discovered that what works best for customers wishing to instrument such short-lived application processes is to enable the agent flag -Dtakipi.shutdown.gracetime=20000. This will keep the agent alive long enough for it to be able to complete its required initialization and avoid such errors.
An important result of doing so and using the -Dtakipi.shutdown.gracetime=20000 property setting on an application monitored with the OverOps agent is to extend the lifetime of that process to a minimum of 22 seconds. It will effectively force the application process to stay running, even if the application process would normally have shut down otherwise without the use of this property setting. This may be an important consequence to keep in mind when considering its use, as it may potentially lengthen the overall lifetime of a workload, especially in cases where such a monitored application or JVM belonging to a Jenkins job, for example, maybe repeatedly rerun causing accumulation of such added delays.