Open chenyuango opened 6 years ago
The same behavior while trying to save 56KB md-document. Document is successfully saved to disk (into ./repo directory) but CPU load goes to 100% and Wiki page stops responding in broswer. Less size documents are saved successfully and Wiki continues working.
Ubuntu 16.04, Wiki.js 1.0.102, Node v8.11.4.
I caught conditions when CPU rises to 100% and Wiki stops. When you add table with huge quantity of REPEATED spaces and minuses - it falls. Decrease number of spaces and minuses if possible, like this: | ----------- |:----------------------------------------------------:| :------------------------------------------------------------------------------------------------------------:| - falls
| ----------- |:------------------------------------------:| :-------------------------------------------------------:| - works
@ru-kontrol thanks for your effort on catching this! Was pulling my hair trying to figure the issue regarding the sudden surge of CPU usage on saving change.
Try disabling mathjax
in your config.yml.
@NGPixel This doesn't seems to work though. :)
Went to do some research, it has some relation to the table as mentioned by @ru-kontrol Reference to https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#tables
If aesthetic does not matter, we only require a minimal of 3 dashes for each header cell, as well as reducing the number of spaces just to make it align. This reduces the load time greatly. Which was the main issue I faced
However, regarding the 100% CPU usage, it doesn't seem to fix it. :(
I second this issue
@NGPixel This doesn't seems to work though. :)
Went to do some research, it has some relation to the table as mentioned by @ru-kontrol Reference to https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#tables
If aesthetic does not matter, we only require a minimal of 3 dashes for each header cell, as well as reducing the number of spaces just to make it align. This reduces the load time greatly. Which was the main issue I faced
However, regarding the 100% CPU usage, it doesn't seem to fix it. :(
I can second this. The node
process always takes 100%. The fix in reducing the spaces and dashes helps in saving a markdown file.
I'm facing the same issue. When using MD tables I use this generator: https://www.tablesgenerator.com/markdown_tables
I was able to "fix" the issue using "compact mode" in my tables, when using standard mode the server process would skyrocket and timeout, leaving agent.js with 100% CPU, when using compact mode it behaves normally for now.
Would someone be willing to post an example which results in the server timing out? I want to make sure the issue isn't present in 2.0.
Would someone be willing to post an example which results in the server timing out? I want to make sure the issue isn't present in 2.0.
This gist makes saving the page take a long while, about 15 seconds on my system, though it does come through in the end. Saving the same file as a gist on GitHub took less than a second.
For me, the CPU issue happens every time the agent runs (I think it's once per day?).
I looked at the source code. Isn't the agent just syncing with remote git repo? Why would this cause 100% CPU usage?
Actual behavior
Expected behavior
Steps to reproduce the behavior
when I save a large table(about 50 lines), I can not save success. Then the server stop work and CPU load up to 100%.![image](https://user-images.githubusercontent.com/5491630/35615828-46023142-06ae-11e8-90ab-e61f75ada1a0.png)