Thanks for another quick quality of life fix. It's appreciated!
Problem with Admin statistics graph
I can see users create new posts, i can see users on the right side of the admin panel, but my traffic graph looks like it's dead and it has this huge gap.
It died @ 4AM and it looks like it's recovering now after i restarted forum.
Anyone knows what is that all about?
Wierd stuff keeps happening.
Look at this:
Users are on page as it can be seen on right side, but graph is not showing em. Not only current users but there is no graph data for quiet some time now, and it comes and goes at random times.
Anyone has any idea why is that?
Are you using nginx to send users to your nodebb backends? Are their ips forwarded properly? If not nodebb will see everyone coming from the same IP and you will only see 1 unique visitor.
Yes, it's nginx, and it is working fine on other sites, and it was working fine yesterday on that forum instance, and than it started working again, and than stopped again as it can be seen on screenshots. I have no cloe wtf is going on with it. I restarted nodebb and it's working fine now. Well see for how long.
I dont have an idea where to look at, where to search for possible problems / errors.
What about cloudflare? If it was enabled all ips would come from cloudflare ips unless they are forwarded.
Cloudflare status is enabled and running, no change whatsoever from time when stats are working and when they are not working. At least no change that i know of or that i did (im only one who has access to it).
Today, same story:
It decided that it doesnt want to work anymore and than it decided that it wont track unique visitors but only page visits few hours after (as it can be seen on this fresh screenshot).
What makes me wonder is that youc an see numbers under "active users". It's not like it's not getting any info or anything.
Just one extra info, it's hosted on digitalocean 5$ droplet with 1G swap mem active. It it possible that some kind of lack of resources is causing this? Im guessing that it is not because problem would ocure only on traffic peeks and not on totaly random times: 4AM, 2PM, 8AM....
Ill restart nodebb (./nodebb restart) now and see if it will help.
Yup...restart made it work again, but time without data stayed that way (without of data).
Is there log file i an monitor or anything i can do to even try to rule out anything? I have no clue even in which direction i should look at.
I have full access to VPS and all, i know my way around it, it's just that im new to nodejs so i dont know much about debugging.
There are other files in the nodebb/logs directory I think. You want to look in
last time that file had entry was 25.1....do i have to enable something to make it more active? Some kind of debug level?
If you use
./nodebb startit should output to that file.
Oh sorry, my bad, im stupid, i was looking at wrong putty window....25.1 is from my local test server. Yes, there is fresh log output, ill check it out to see is there is something interesting at times when stats stopped being recorded.
Ok from log:
2018-02-01T17:00:02.980Z  - ^[[32minfo^[[39m: [user/jobs] Digest (day) scheduling completed. 1 email(s) sent.
2018-02-02T13:29:28.548Z  - ^[[32minfo^[[39m: [build] Building in parallel mode
2018-02-02T13:29:28.561Z  - ^[[32minfo^[[39m: [build] plugin static dirs build started
2018-02-02T13:29:28.581Z  - ^[[32minfo^[[39m: [build] requirejs modules build started
2018-02-02T13:29:28.585Z  - ^[[32minfo^[[39m: [build] client js bundle build started
2018-02-02T13:29:28.589Z  - ^[[32minfo^[[39m: [build] admin js bundle build started
2018-02-02T13:29:28.597Z  - ^[[32minfo^[[39m: [build] client side styles build started
2018-02-02T13:29:28.599Z  - ^[[32minfo^[[39m: [build] admin control panel styles build started
2018-02-02T13:29:28.601Z  - ^[[32minfo^[[39m: [build] templates build started
Not much in there. Normal stuff and my reboot....no errors , no nothing....
It seams that i "solved" my problem by upgrade-ing VPN instance from old 512MB RAM Digitalocean VPS to new 1GB RAM Digitalocean VPS (free upgrade) and by disabling clamav who ate whole lot of RAM.
So my uneducated guess is that it had something to do with lack of RAM (512Mb + 1Gb swap).
That's interesting, thanks for sharing the conclusion!