Clicking Save Changes results in 'Error: undefined' popup
Actual behavior
- Clicking Save Changes results in 'Error: undefined' popup and hang for between 30 seconds and a minute.
- Next, the wiki will be down completely for a few minutes. Firefox will show the standard error: we cannot find this page.
- After a couple of minutes (approx. 10 minutes), the login screen will appear [we are back online] and I have to login again. Time is approx. 12.40.
- I have four pages on my Wiki. But the [restarted?] wiki will now only show two pages: Home and Hosting.
- 12:58: In ‘All Pages’ view, the wiki will still only show pages Home and Hosting. I can however access my page ‘Study’ directly via http://[my IP address]:2086/study.
- 13:21: In ‘All Pages’ view, the wiki will now show 3 pages: Home, Hosting and Study. The fourth and last page still does not show up in ‘All pages’ view.
- 13:25: I restart nginx and wiki.js.
Expected behavior
Save page when I click save changes.
Steps to reproduce the behavior
I do not know how to reproduce this. But it does happen often (every day).
Firefox developer console output
Usage of window.controllers/Controllers is not supported anylonger. Do not use this for UA detection. vendor.js line 1 > Function:3:17840 The connection with ws://[my VPS IP adress]:2086/socket.io/?EIO=3&transport=websocket&sid=__i8W58O-j4TVoMhAABI was interrupted during page load. vendor.js:1:472056
How I run wiki.js
- I run wiki.js behind nginx on a VPS, on Ubuntu 18.04. I access wiki.js from [my VPS IP address]:2086. Port 2086 is open in ufw.
- I use a bitbucket free private repository and use the master branch. I use login with username and password instead of private key.
- wikijs v1.0.102
- git v2.11.0
- nginx v1.10.3
- Nodejs v10.13.0
Probably it has something to do with the nginx and virtualhost config settings
I followed tutorials to get the wiki working, but I do not know the ratio behind every command I copied into my config files.
Virtual host settings in nginx config (the one in /sites-available, which is symlinked to /sites-enable):
server { root /var/www/html; listen 80; listen [::]:80; server_name wikijs; location / { proxy_pass http://localhost:2086; try_files $uri $uri/ =404; } add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload"; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; }
Main nginx config file settings -> /etc/nginx/nginx.conf:
user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf;
events { worker_connections 768; # multi_accept on; }
http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/sites-enabled/*;
}
Nginx error log -> nano /var/log/nginx/error.log
- Empty
Nginx access log -> nano /var/log/nginx/access.log

12:55: ran command pm2 show wiki

Approx 13.00: Logs wiki –-lines output -> pm2 logs wiki --lines 100 [part of it]
[TAILING] Tailing last 100 lines for [wiki] process (change the value with --lin es option) /srv/wikijs/logs/wiki-error-0.log last 100 lines:
0|wiki | (node:12108) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated 0|wiki | (node:14352) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated
/srv/wikijs/logs/wiki-output-0.log last X lines: 0|wiki | 2018-11-18T11:39:29.518Z - info: [SERVER] Starting HTTP/WS server on port 2086... 0|wiki | 2018-11-18T11:39:29.559Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING] 0|wiki | 2018-11-18T11:39:29.700Z - info: [SERVER] Search index flushed and ready. 0|wiki | 2018-11-18T11:39:29.848Z - info: [SERVER] Git repository is OK. 0|wiki | 2018-11-18T11:39:29.975Z - info: [AGENT] Background Agent is initializing... 0|wiki | 2018-11-18T11:39:31.485Z - info: [AGENT] Checking Git repository... 0|wiki | 2018-11-18T11:39:32.365Z - info: [AGENT] Running all jobs... 0|wiki | 2018-11-18T11:39:32.366Z - info: [AGENT] Performing pull from remote Git repository... 0|wiki | 2018-11-18T11:39:32.415Z - info: [AGENT] Git repository is OK. 0|wiki | 2018-11-18T11:39:33.761Z - info: [AGENT] Git Pull completed. 0|wiki | 2018-11-18T11:39:33.768Z - info: [AGENT] Git Push skipped. Repository is already in sync.
13.20: Logs wiki –-lines output (no change wrt when I ran the command at 13.00):

How much RAM do you have?
Excuse me for my late reaction, I am currently working/studying a lot.
This cloud VPS from OVH has 2GB RAM.