Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [General] Last visit date 1 min ago -> Offline?
#1
Not Solved
I have a weird occurance in my forum, where there will be maybe 3-5 users who appear as  "offline", but they are also frequently visiting the board (less than 1 minute ago)

It doesnt happen to all my members, and it only shows to about 3-5 members and it is all the time (They will have 12 hours online time + 100 days registered)

I'm curious to know why I cant view their online status ever even with administrator rights? (members can not appear invisible, so that is not the case)

Mybb ver = 1.8.21
Reply
#2
Not Solved
I’ve noticed this bug on 1.8.22. It often shows that they are online in both places, but they have different times associated with it (or show offline entirely in some cases). Never figured this one out, but I’m following this as well.
Reply
#3
Not Solved
While Last Visit time is saved in the mybb_users table, together with other profile data, the Online/Offline Status is determined by a corresponding row in the mybb_sessions table.

This SQL query would return the unix timestamp and location of last known visit stored in the sessions table for user ID 1:
SELECT time, location FROM mybb_sessions WHERE uid = 1;

If the row doesn't exist, it may have been deleted by e.g.:
  • logging out,
  • on 1.8.21 and before: opening the forum as guest from the same IP address (so using a second browser can cause this too),
  • automated purging (MyBB only deletes old session rows, but if you use custom tasks like https://community.mybb.com/post-1341049.html#pid1341049, try disabling them temporarily to see if it helps).
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#4
Not Solved
(03-26-2020, 03:46 PM)Devilshakerz Wrote: While Last Visit time is saved in the mybb_users table, together with other profile data, the Online/Offline Status is determined by a corresponding row in the mybb_sessions table.

This SQL query would return the unix timestamp and location of last known visit stored in the sessions table for user ID 1:
SELECT time, location FROM mybb_sessions WHERE uid = 1;

If the row doesn't exist, it may have been deleted by e.g.:
  • logging out,
  • on 1.8.21 and before: opening the forum as guest from the same IP address (so using a second browser can cause this too),
  • automated purging (MyBB only deletes old session rows, but if you use custom tasks like https://community.mybb.com/post-1341049.html#pid1341049, try disabling them temporarily to see if it helps).

The query for one member exists, which shows Offline while being online last 1 minute ago:
[Image: 59ee6b7f05b1d0d2266025ae420a1aa6.png]
Reply
#5
Not Solved
(03-26-2020, 04:30 PM)makpaolo Wrote: The query for one member exists, which shows Offline while being online last 1 minute ago:
[Image: 59ee6b7f05b1d0d2266025ae420a1aa6.png]

Would you like to do a search in the server's access log, if any, by this user's IP to see if the user has visited the logout link (e.g. https://community.mybb.com/member.php?action=logout&logoutkey=XXXXXXXXXXX) at the time specified in the image?
Worth a try.
Reply
#6
Not Solved
(03-26-2020, 05:34 PM)noyle Wrote:
(03-26-2020, 04:30 PM)makpaolo Wrote: The query for one member exists, which shows Offline while being online last 1 minute ago:
[Image: 59ee6b7f05b1d0d2266025ae420a1aa6.png]

Would you like to do a search in the server's access log, if any, by this user's IP to see if the user has visited the logout link (e.g. https://community.mybb.com/member.php?action=logout&logoutkey=XXXXXXXXXXX) at the time specified in the image?

I could take a look. Where can I find the servers access log at?
Reply
#7
Not Solved
(03-26-2020, 06:08 PM)makpaolo Wrote:
(03-26-2020, 05:34 PM)noyle Wrote:
(03-26-2020, 04:30 PM)makpaolo Wrote: The query for one member exists, which shows Offline while being online last 1 minute ago:
[Image: 59ee6b7f05b1d0d2266025ae420a1aa6.png]

Would you like to do a search in the server's access log, if any, by this user's IP to see if the user has visited the logout link (e.g. https://community.mybb.com/member.php?action=logout&logoutkey=XXXXXXXXXXX) at the time specified in the image?

I could take a look. Where can I find the servers access log at?

They vary according to how the HTTP server is configured:
  • If you're on shared hosting, ask your hosting provider for help.
  • If cPanel/etc. is what you use for web site management, maybe the access log, if enabled, could be read from the panel too.
  • ...
  • If server logging is turned off, you'd like to enable it for temporary investigation.
Worth a try.
Reply
#8
Not Solved
It also looks like a few hours have elapsed between time and your reply (so it would be cut off according to Who's Online → Cut-off Time (mins) setting) - if you looked at an active user's data immediately before, it may indicate that session data is not being updated as often as it should.
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#9
Not Solved
Looks like I'm wrong. By logging out a user, relevant records in the sessions table of that user will be deleted.

(Yesterday, 12:22 PM)Devilshakerz Wrote: It also looks like a few hours have elapsed between time and your reply (so it would be cut off according to Who's Online → Cut-off Time (mins) setting) - if you looked at an active user's data immediately before, it may indicate that session data is not being updated as often as it should.

@makpaolo, would you like to check your forum's setting of Cut-off Time (mins)? Maybe it's set to a too small value for MyBB to view this user as online. However, there could be other reasons causing this though I've no idea what it'll be.
Worth a try.
Reply
#10
Not Solved
(Yesterday, 12:22 PM)Devilshakerz Wrote: It also looks like a few hours have elapsed between time and your reply (so it would be cut off according to Who's Online → Cut-off Time (mins) setting) - if you looked at an active user's data immediately before, it may indicate that session data is not being updated as often as it should.

(Yesterday, 01:25 PM)noyle Wrote: @makpaolo, would you like to check your forum's setting of Cut-off Time (mins)? Maybe it's set to a too small value for MyBB to view this user as online. However, there could be other reasons causing this though I've no idea what it'll be.

Cut off time seems to not be the reason either. It’s set to a number that’s proper.

It shows for specific users, but it seems like it’s happening more than before, but still not affecting 3/4 of online users
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)