A Ghost down every 3-10 min


#1

Self-hosted Ghost.
Ubuntu 16.04 LTS.

May 29 18:03:49 kurisu node[61712]: The server has encountered an error. May 29 18:03:49 kurisu systemd[1]: ghost_kurisu-ru.service: Main process exited, code=exited, status=1/FAILURE May 29 18:03:49 kurisu systemd[1]: ghost_kurisu-ru.service: Unit entered failed state. May 29 18:03:49 kurisu systemd[1]: ghost_kurisu-ru.service: Failed with result 'exit-code'. May 29 18:03:49 kurisu systemd[1]: ghost_kurisu-ru.service: Service hold-off time over, scheduling restart. May 29 18:03:49 kurisu systemd[1]: Stopped Ghost systemd service for blog: kurisu-ru. May 29 18:03:49 kurisu systemd[1]: Started Ghost systemd service for blog: kurisu-ru. May 29 18:03:52 kurisu node[61737]: [2018-05-29 16:03:52] #033[31mERROR#033[39m May 29 18:03:52 kurisu node[61737]: #033[31m May 29 18:03:52 kurisu node[61737]: #033[31mNAME: InternalServerError#033[39m May 29 18:03:52 kurisu node[61737]: #033[31mCODE: ECONNREFUSED#033[39m May 29 18:03:52 kurisu node[61737]: #033[31mMESSAGE: The server has encountered an error.#033[39m May 29 18:03:52 kurisu node[61737]: #033[37mlevel:#033[39m#033[37mnormal#033[39m May 29 18:03:52 kurisu node[61737]: #033[37mInternalServerError: The server has encountered an error. May 29 18:03:52 kurisu node[61737]: at new GhostError (/var/www/ghost/versions/1.22.8/core/server/lib/common/errors.js:9:26) May 29 18:03:52 kurisu node[61737]: at /var/www/ghost/versions/1.22.8/index.js:37:15 May 29 18:03:52 kurisu node[61737]: at tryCatcher (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/util.js:16:23) May 29 18:03:52 kurisu node[61737]: at Promise._settlePromiseFromHandler (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:512:31) May 29 18:03:52 kurisu node[61737]: at Promise._settlePromise (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:569:18) May 29 18:03:52 kurisu node[61737]: at Promise._settlePromise0 (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:614:10) May 29 18:03:52 kurisu node[61737]: at Promise._settlePromises (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:689:18) May 29 18:03:52 kurisu node[61737]: at Async._drainQueue (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/async.js:133:16) May 29 18:03:52 kurisu node[61737]: at Async._drainQueues (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/async.js:143:10) May 29 18:03:52 kurisu node[61737]: at Immediate.Async.drainQueues (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/async.js:17:14) May 29 18:03:52 kurisu node[61737]: at runCallback (timers.js:672:20) May 29 18:03:52 kurisu node[61737]: at tryOnImmediate (timers.js:645:5) May 29 18:03:52 kurisu node[61737]: at processImmediate [as _immediateCallback] (timers.js:617:5) May 29 18:03:52 kurisu node[61737]: Error: connect ECONNREFUSED 127.0.0.1:3306 May 29 18:03:52 kurisu node[61737]: at Object.exports._errnoException (util.js:1020:11) May 29 18:03:52 kurisu node[61737]: at exports._exceptionWithHostPort (util.js:1043:20) May 29 18:03:52 kurisu node[61737]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1105:14) May 29 18:03:52 kurisu node[61737]: -------------------- May 29 18:03:52 kurisu node[61737]: at Protocol._enqueue (/var/www/ghost/versions/1.22.8/node_modules/mysql/lib/protocol/Protocol.js:145:48) May 29 18:03:52 kurisu node[61737]: at Protocol.handshake (/var/www/ghost/versions/1.22.8/node_modules/mysql/lib/protocol/Protocol.js:52:23) May 29 18:03:52 kurisu node[61737]: at Connection.connect (/var/www/ghost/versions/1.22.8/node_modules/mysql/lib/Connection.js:130:18) May 29 18:03:52 kurisu node[61737]: at /var/www/ghost/versions/1.22.8/node_modules/knex/lib/dialects/mysql/index.js:109:18 May 29 18:03:52 kurisu node[61737]: at Promise._execute (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/debuggability.js:303:9) May 29 18:03:52 kurisu node[61737]: at Promise._resolveFromExecutor (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:483:18) May 29 18:03:52 kurisu node[61737]: at new Promise (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:79:10) May 29 18:03:52 kurisu node[61737]: at Client_MySQL.acquireRawConnection (/var/www/ghost/versions/1.22.8/node_modules/knex/lib/dialects/mysql/index.js:104:12) May 29 18:03:52 kurisu node[61737]: at create (/var/www/ghost/versions/1.22.8/node_modules/knex/lib/client.js:283:23) May 29 18:03:52 kurisu node[61737]: at tryPromise (/var/www/ghost/versions/1.22.8/node_modules/tarn/lib/Pool.js:366:22) May 29 18:03:52 kurisu node[61737]: at tryPromise (/var/www/ghost/versions/1.22.8/node_modules/tarn/lib/utils.js:57:20) May 29 18:03:52 kurisu node[61737]: at Promise (/var/www/ghost/versions/1.22.8/node_modules/tarn/lib/Pool.js:366:5) May 29 18:03:52 kurisu node[61737]: at Promise._execute (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/debuggability.js:303:9) May 29 18:03:52 kurisu node[61737]: at Promise._resolveFromExecutor (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:483:18) May 29 18:03:52 kurisu node[61737]: at new Promise (/var/www/ghost/versions/1.22.8/node_modules/bluebird/js/release/promise.js:79:10) May 29 18:03:52 kurisu node[61737]: at callbackOrPromise (/var/www/ghost/versions/1.22.8/node_modules/tarn/lib/Pool.js:357:10)#033[39m May 29 18:03:52 kurisu node[61737]: #033[39m May 29 18:03:53 kurisu node[61737]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:58 May 29 18:03:53 kurisu node[61737]: throw error; May 29 18:03:53 kurisu node[61737]: ^ May 29 18:03:53 kurisu node[61737]: The server has encountered an error. May 29 18:03:53 kurisu systemd[1]: ghost_kurisu-ru.service: Main proc

That logs founded in syslog-file. Server run and down. How fix it?


#2

@owner as far as I can tell, it looks like the error is coming from your ghost instance’s connection to the mysql database. Is your mysql database on the same server as the ghost instance or is it on a remote server?

If it’s on a remote server, my guess is the connection between your ghost server and your mysql database server isn’t reliable, which is causing Ghost to go down every 3-10 minutes because it can’t connect to the database.


#3

How to fix it? (text for 20 charters)


#4

I would suggest looking at the MySQL log files to see why MySQL crashes. The log file location is configured in your my.cnf.


#5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.