No Code Attached Yet
avatar hannes01
hannes01
1 Feb 2018

Steps to reproduce the issue

Update Joomla to 3.8.4
Check the number of visitors.

Actual result

The number of visitors is abnormally high.
For example it shows 34 000 visitors, although there are 10 visitors based on Google Analytics.

System information (as much as possible)

Joomla 3.8.4
PHP 7.0

Additional comments

Received an error message after the update:

screen shot 2018-02-01 at 08 28 42

Disabling cache did not change the situation.

Thread in Joomla forum: https://forum.joomla.org/viewtopic.php?p=3511468#p3511468

Thank you.

avatar hannes01 hannes01 - open - 1 Feb 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Feb 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Feb 2018
Category com_users
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Feb 2018

Thanks @hannes01 for reporting and Link to Forum-Thread.

avatar joomdonation
joomdonation - comment - 1 Feb 2018

Could you please access to System - Global Configuration, look at System tab, check to see what's the value of Session Handle? If it is Database, then it might related to this PR #19165

avatar hannes01
hannes01 - comment - 1 Feb 2018

Hi,

thanks for the answer. Currently the Session Handler is PHP:

screen shot 2018-02-01 at 08 49 42


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19511.

avatar central4all
central4all - comment - 1 Feb 2018

I have the same / similar problem with members,
After updating to version 3.8.4. since then the users online module is malfunctioning,
it shows 2 or 3 times more logged users than what it was before.
I tried to change Session Lifetime nothing changed,
Session Handler is DB , i changed it to PHP and again back to DB because nothing change again


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19511.
avatar joomdonation
joomdonation - comment - 1 Feb 2018

Try to look at this line https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Application/CMSApplication.php#L160 from your Joomla installation, change 5 to 2, then check it again

That's the only change from 3.8.3 to 3.8.4 I know could cause this issue

avatar joomdonation
joomdonation - comment - 1 Feb 2018

To be more clear, change the code in that line from

if ($handler !== 'database' && $time % 5 === 0)

To

if ($handler !== 'database' && $time % 2 === 0)
avatar hannes01
hannes01 - comment - 1 Feb 2018

Thank you for the suggestion. I changed the code but unfortunately it did not fix it.

avatar joomdonation
joomdonation - comment - 1 Feb 2018

Did you also change Session Lifetime after update? 60 is a high value, maybe change it to a lower number like 15 would help

avatar mbabker
mbabker - comment - 1 Feb 2018
  1. As noted in the merged pull request, this is the trade off of the performance fix put in place to keep this query from being arbitrarily executed on every even numbered second.

  2. If you are really reliant on these modules reporting accurate numbers, you will need a cron job to force garbage collection of expired metadata and/or sessions. With the referenced pull request applied this cleanup will not run at all when using the database handler because of the mixed storage/purpose of the session table and the frequency of cleanup when other handlers are in use is reduced from once every 2 seconds to once every 5 seconds (in effect, you go from running this query a max of 30 times per minute to 12 times per minute).

avatar hannes01
hannes01 - comment - 1 Feb 2018

Thank you. No, the session lifetime is the same as before. It was increased to 60 about a year ago, because members of the site complained about a too short session... I just tried with 20, but the issue remains...

I'm sorry mbabker, as English is not my first language and I'm not a developer, this information is a bit confusing for me :) You are saying that I should create a cron job? I know how to create one in Cpanel but unfortunately I can't come up with a command.

avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Feb 2018
Status New Discussion
avatar central4all
central4all - comment - 1 Feb 2018

I am like you hannes,
none of these is helpful

avatar sandewt
sandewt - comment - 1 Feb 2018

I have checked the number of guests at this moment on my site.
There is a huge increase !!!
So I can confirm this issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19511.

I use the DATABASE session handler !!!

avatar joomdonation
joomdonation - comment - 1 Feb 2018

@mbabker Is onAfterResponse a correct event trigger? Look like a typo, onAfterRespond is correct event trigger

Could someone please change this line https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Application/CMSApplication.php#L163 to

'onAfterRespond',

Then check to see whether the issue sorted?

avatar joomdonation
joomdonation - comment - 1 Feb 2018

Please test PR #19514 . It should fix this issue

avatar hannes01
hannes01 - comment - 1 Feb 2018

Hello,

thanks! I tried it and the counter went from 35 000 to 1500. This can actually be a realistic number as I stated a Facebook campaign and it reflects the number visitors within 1 hour.
I will keep an eye on it, but indeed it seems to be fixed now.

Can others confirm?

avatar central4all
central4all - comment - 1 Feb 2018

mine is already 'onAfterResponse',
but is not working

avatar central4all
central4all - comment - 1 Feb 2018

respond instead of responce ?
is this the error ?

avatar joomdonation
joomdonation - comment - 1 Feb 2018

Change from onAfterResponse to onAfterRespond

avatar central4all
central4all - comment - 1 Feb 2018

@i did it but nothing look fixed,
i have problem with number of users not with the visitors.
Maybe another typo ?

https://image.prntscr.com/image/99vT7QW0QAW_FzxEtm6zPA.png

avatar Quy Quy - change - 1 Feb 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-02-01 15:45:11
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2018
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 1 Feb 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Feb 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19511

avatar Quy
Quy - comment - 1 Feb 2018

See PR #19514.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19511.

avatar Quy
Quy - comment - 1 Feb 2018

See PR #19514.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19511.

avatar csthomas
csthomas - comment - 1 Feb 2018

For DB session garbage collection may not be called at all.

See http://php.net/manual/pl/session.configuration.php#115842

You can check that by putting that code in your template index.php.

<?= ini_get('session.gc_probability'); ?>

If ini_get('session.gc_probability'); is equal to 0 then php won't clear your database table #__session.

avatar timstohr
timstohr - comment - 16 Feb 2018

Hi Tuan and others, having the same problem. My user session table has grown to a staggering 700 Mb with 66.000 entries. The logged in users have gone from at maximum 100 simultaneously logged in to 1000 and growing. The admins who are logged in are now over 20 even though there is only one admin account. Anything to do about it?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Feb 2018

@timstohr please look at #19548 #19585

avatar Quy
Quy - comment - 16 Feb 2018

@timstohr Please test #19687

Add a Comment

Login with GitHub to post a comment