Skip to content

Commit

Permalink
Version 0.8.27
Browse files Browse the repository at this point in the history
Now emitting a warning on startup for Node v10.0 to v10.8, due to the core timer bug: nodejs/node#22149
Updated timer bug warning in README.
Bumped pixl-server version to 1.0.16 for more verbose startup log entry.
  • Loading branch information
jhuckaby committed Sep 2, 2018
1 parent e312471 commit 8c59536
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# NODE.JS v10.x ALERT WARNING CAUTION
# Node.js v10.x ALERT WARNING CAUTION

There is a [known bug in Node.js v10](https://github.com/nodejs/node/issues/22149) that causes all timers to stop firing after approximately 25 days of continuous running. Since Cronicle is a scheduler daemon, it relies *completely* on the Node.js timer system, so this is a death sentence. The bug affects all versions of Node.js v10, from v10.0.0 to v10.9.0. The bug is marked as fixed and a [PR has landed](https://github.com/nodejs/node/pull/22214) in Git, but it won't be released until Node v10.10 (presumably). In the meantime, your options are as follows:
There is a [known bug in Node.js v10](https://github.com/nodejs/node/issues/22149) that causes all timers to stop firing after approximately 25 days of continuous running. Since Cronicle is a scheduler daemon, it relies *completely* on the Node.js timer system, so this is a death sentence. The bug affects Node.js versions v10.0.0 to v10.8.0. **The bug is fixed in Node v10.9.0**. Your options are as follows:

1. Run Cronicle under Node LTS (i.e. Node version 8). The bug was introduced in Node v10.0.0, so any version of Node prior to that will work fine.
2. Setup a weekly restart job. You can do this as an actual Cronicle event using the [Shell Plugin](#built-in-shell-plugin) and [Detached Mode](#detached-mode), or just add a crontab to your server(s) like this:
1. If you are running Node v10.x, make sure you are on v10.9.0 or later!
2. Run Cronicle under Node LTS (i.e. Node version 8). The bug was introduced in Node v10.0.0, so any version of Node prior to that will work fine.
3. Setup a weekly restart job. You can do this as an actual Cronicle event using the [Shell Plugin](#built-in-shell-plugin) and [Detached Mode](#detached-mode), or just add a crontab to your server(s) like this:

```
echo "0 3 * * 0 /opt/cronicle/bin/control.sh restart" > /etc/cron.d/cronicle-weekly-restart.cron
```

Once an official fix is released (presumably in Node v10.10), I will have Cronicle emit a warning if it is started up on any affected version of Node. For more information on this ongoing situation, see [Issue #108](https://github.com/jhuckaby/Cronicle/issues/108).
Cronicle will emit a warning to the console if it is started up on any affected version of Node. For more information on this bug, see [Issue #108](https://github.com/jhuckaby/Cronicle/issues/108).

# Overview

Expand Down
2 changes: 1 addition & 1 deletion lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = Class.create({
startup: function(callback) {
// start cronicle service
var self = this;
this.logDebug(3, "Cronicle engine starting up", process.argv );
this.logDebug(3, "Cronicle engine starting up" );

// create a few extra dirs we'll need
try { mkdirp.sync( this.server.config.get('log_dir') + '/jobs' ); }
Expand Down
8 changes: 7 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env node

// Cronicle Server - Main entry point
// Copyright (c) 2015 Joseph Huckaby
// Copyright (c) 2015 - 2018 Joseph Huckaby
// Released under the MIT License

// Emit warning for broken versions of node v10
// See: https://github.com/jhuckaby/Cronicle/issues/108
if (process.version.match(/^v10\.[012345678]\.\d+$/)) {
console.error("\nWARNING: You are using an incompatible version of Node.js (" + process.version + ") with a known timer bug.\nCronicle will stop working after approximately 25 days under these conditions.\nIt is highly recommended that you upgrade to Node.js v10.9.0 or later, or downgrade to Node LTS (v8.x).\nSee https://github.com/jhuckaby/Cronicle/issues/108 for details.\n");
}

var PixlServer = require("pixl-server");

// chdir to the proper server root dir
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cronicle",
"version": "0.8.26",
"version": "0.8.27",
"description": "A simple, distributed task scheduler and runner with a web based UI.",
"author": "Joseph Huckaby <[email protected]>",
"homepage": "https://github.com/jhuckaby/Cronicle",
Expand Down Expand Up @@ -51,7 +51,7 @@
"pixl-request": "^1.0.21",
"pixl-mail": "^1.0.8",
"pixl-perf": "^1.0.5",
"pixl-server": "^1.0.15",
"pixl-server": "^1.0.16",
"pixl-server-storage": "^2.0.9",
"pixl-server-web": "^1.1.7",
"pixl-server-api": "^1.0.1",
Expand Down

0 comments on commit 8c59536

Please sign in to comment.