tarantool watchdog module
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 19 commits ahead of rosik:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmake
test
.gitignore
.travis.mk
.travis.yml
AUTHORS
CHANGELOG.md
CMakeLists.txt
LICENSE
README.md
watchdog-scm-1.rockspec
watchdog.c

README.md

Build Status

Simple watchdog module for Tarantool

The watchdog module is useful when the responsiveness of the system is important.

The watchdog module spawns a thread and continuously checks the value of an internal variable. The variable is updated periodically by a separate tarantool fiber.

The fiber update period equals to 1/2 of the timeout parameter. The watchdog period is hardcoded to be 200ms.

Whenever a problem with an update fiber occurs the watchdog thread performs exit(6). The problem may be caused by using blocking signals or by mistakes in other modules (e.g. while true ... end)

Installing

$ tarantoolctl rocks install watchdog

Usage

local watchdog = require('watchdog')
watchdog.start(1) -- timeout in seconds (double)