requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
100 stars 75 forks source link

100% CPU usage and background jobs not completed #123

Open bd5rv opened 6 years ago

bd5rv commented 6 years ago

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

NGPixel commented 6 years ago

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

bd5rv commented 6 years ago

I disabled mathjax but problem remains.

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

which consumes most cpu resources.

NGPixel commented 6 years ago

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

bd5rv commented 6 years ago

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

bd5rv commented 6 years ago

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

koallen commented 5 years ago

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 commented 5 years ago

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