wiki-v1 icon indicating copy to clipboard operation
wiki-v1 copied to clipboard

100% CPU usage and background jobs not completed

Open bd5rv opened this issue 7 years ago • 7 comments

Actual behavior

I put the wiki.js managed by pm2. After a restart, the background jobs keep running all the time. Here is what I found in the log:

2018-10-19T09:10:00.675Z - info: [AGENT] All jobs completed successfully! Going to sleep for now. 2018-10-19T09:15:00.672Z - info: [AGENT] Running all jobs... 2018-10-19T09:15:00.677Z - info: [AGENT] All jobs completed successfully! Going to sleep for now. 2018-10-19T09:17:01.506Z - info: [SERVER] Wiki.js is initializing... 2018-10-19T09:17:01.756Z - info: [SERVER] Checking data directories... 2018-10-19T09:17:01.760Z - info: [SERVER] Data and Repository directories are OK. 2018-10-19T09:17:02.193Z - info: [SERVER] Checking Git repository... 2018-10-19T09:17:03.720Z - info: [SERVER] Starting HTTP/WS server on port 3000... 2018-10-19T09:17:03.759Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING] 2018-10-19T09:17:03.858Z - info: [SERVER] Search index flushed and ready. 2018-10-19T09:17:03.878Z - info: [SERVER] Remote Git syncing is disabled. Not recommended! 2018-10-19T09:17:03.879Z - info: [SERVER] Git repository is OK. 2018-10-19T09:17:03.992Z - info: [AGENT] Background Agent is initializing... 2018-10-19T09:17:04.645Z - info: [AGENT] Checking Git repository... 2018-10-19T09:17:05.322Z - info: [AGENT] Remote Git syncing is disabled. Not recommended! 2018-10-19T09:17:05.323Z - info: [AGENT] Git repository is OK. 2018-10-19T09:17:05.331Z - info: [AGENT] Running all jobs... 2018-10-19T09:29:48.950Z - info: [SERVER] Wiki.js is initializing...

Jobs are never completed and CPU usage is about 100%.

Expected behavior

Low CPU usage. All jobs completed successfully! Going to sleep for now.

Steps to reproduce the behavior

Not sure

bd5rv avatar Oct 21 '18 15:10 bd5rv

Try to turn off mathjax in your config.yml and try again.

NGPixel avatar Oct 22 '18 01:10 NGPixel

I disabled mathjax but problem remains.

By the way, it is the process node agent.js

which consumes most cpu resources.

bd5rv avatar Oct 22 '18 09:10 bd5rv

Do you have git installed on your machine? Seems like have something blocking the agent from running.

NGPixel avatar Oct 23 '18 04:10 NGPixel

I had git installed and it was disabled (git:false) in the config.yml.

bd5rv avatar Oct 23 '18 05:10 bd5rv

I think I find the problem. The attached file in the repo directory is cause of high CPU usage and the endless job running. Unzip it to get the .md file.

I guess it is the cache job which is blocking.

society.zip

bd5rv avatar Oct 24 '18 17:10 bd5rv

I am still having this issue (as I reported a while ago in Gitter). This is definitely not a MathJax problem, as in the past every thing runs smoothly with MathJax enabled (though I've disabled it now as per your suggestion).

koallen avatar Nov 23 '18 10:11 koallen

Just to add on, the agent is having issue even if I'm doing a completely new install (with an existing Git repo). The agent never manage to pull the repo at all. The log is just

2018-11-23T10:04:12.376Z - info: [SERVER] Wiki.js is initializing...
2018-11-23T10:04:12.692Z - info: [SERVER] Checking data directories...
2018-11-23T10:04:12.694Z - info: [SERVER] Data and Repository directories are OK.
2018-11-23T10:04:13.337Z - info: [SERVER] Checking Git repository...
2018-11-23T10:04:16.398Z - info: [SERVER] Starting HTTP/WS server on port 3001...
2018-11-23T10:04:16.506Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2018-11-23T10:04:16.683Z - info: [SERVER] Search index flushed and ready.
2018-11-23T10:04:17.060Z - info: [SERVER] Git repository is OK.
2018-11-23T10:04:17.364Z - info: [AGENT] Background Agent is initializing...
2018-11-23T10:20:32.809Z - info: [AGENT] Checking Git repository...

koallen avatar Nov 23 '18 10:11 koallen