Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OpenXPKI::Server::WatcUser(Contributed Perl DocumOpenXPKI::Server::Watchdog(3)

NAME
       The watchdog thread

DESCRIPTION
       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. This
	   is a	fatal error that must be handled!  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

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

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

   reload
       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.

   terminate
       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

perl v5.24.1			  2017-07-03	 OpenXPKI::Server::Watchdog(3)

NAME | DESCRIPTION | Methods =head2 run

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=OpenXPKI::Server::Watchdog&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help