Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  OPENXPKI::SERVER::WATCHDOG (3)

.ds Aq ’


The watchdog thread



The watchdog is forked away on startup and takes care of paused workflows. The system has a default configuration but you can override it via the system configuration.

The namespace is system.watchdog. The properties are:
max_fork_redo Retry this often to fork away the initial watchdog process before failing finally. default: 5
max_exception_threshhold There are situations (database locks, no free resources) where a watchdog can not fork away a new worker. After max_exception_threshhold errors occured, we kill the watchdog. <B>This is a fatal error that must be handled!B> default: 10
interval_sleep_exception The number of seconds to sleep after the watchdog ran into an exception. default: 60
max_tries_hanging_workflows Try to restarted stale workflows this often before failing them. default: 3
max_instance_count Allow multiple watchdogs in parallel. This controls the number of control process, setting this to more than one is usually not necessary (and also not wise).

default: 1

interval_wait_initial Seconds to wait after server start before the watchdog starts scanning. default: 30;
interval_loop_idle Seconds between two scan runs if no result was found on last run. default: 5
interval_loop_run Seconds between two scan runs if a result was found on last run. default: 1

Methods =head2 run

Forks away a worker child, returns the pid of the worker


signalhandler registered with the forked worker. Trigger via IPC by the master process when a reload happens.


signalhandler registered with the forked worker. Trigger via IPC by the master process to terminate the worker.


This method is called from the main server to inform the watchdog to reload the config. You should not call this from inside a watchdog worker.


This method uses the process table to look for watchdog instances and workers and sends them a SIGHUP signal. This will NOT kill the watchdog but tell him to not start any new workers. Running workers wont be touched. You should not call this from inside a watchdog worker.


Do a select on the database to check for waiting or stale workflows, if found, the workflow is marked and reinstantiated, the id of the workflow is returned. Returns undef, if nothing is found.

    __flag_and_fetch_workflow( wf_id )

Flag the database row for wf_id.

To prevent a workflow from being reloaded by two watchdog instances, this method first writes a random marker to create row lock and tries to reload the row using this marker. If either one fails, returnes undef.


Check and, if necessary, create the session context
Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 OPENXPKI::SERVER::WATCHDOG (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.