Discuss Joomla! 3.8.5

A place to discuss recent announcements made by the Joomla! Core Team. Let's hear what you have to say.
User avatar
Jaydot
Joomla! Intern
Joomla! Intern
Posts: 98
Joined: Sun Jun 04, 2017 12:11 pm
Location: The Netherlands
Contact:

Re: Discuss Joomla! 3.8.5

Postby Jaydot » Sat Feb 10, 2018 10:31 am

Updated eleven sites this week without a hitch.
Thank you!
The fact that an opinion is widely held is no evidence whatsoever that it is not utterly absurd.
Personal website: https://jaydot.nl

User avatar
layer8
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Mon Dec 05, 2011 4:37 am

Re: Discuss Joomla! 3.8.5

Postby layer8 » Mon Feb 12, 2018 2:23 am

If you session table is huge and your site is slow after update to J.3.8.5, you just need to go to your PHP configuration and set session.gc_probability to 1

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3138
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Discuss Joomla! 3.8.5

Postby ribo » Mon Feb 12, 2018 2:50 am

After update from 3.7.4 to 3.7.5 there is still issue with too many guests in joomla online module when you use in session handler"database" . Please check the test that i made viewtopic.php?f=706&t=958997&p=3512762#p3512856
To be sure if with redis there is no issue i will tell you tomorrow.
chat room spontes : http://www.spontes.com

User avatar
mbabker
Joomla! Hero
Joomla! Hero
Posts: 2061
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: Discuss Joomla! 3.8.5

Postby mbabker » Mon Feb 12, 2018 1:19 pm

ribo wrote:After update from 3.7.4 to 3.7.5 there is still issue with too many guests in joomla online module when you use in session handler"database" . Please check the test that i made viewtopic.php?f=706&t=958997&p=3512762#p3512856
To be sure if with redis there is no issue i will tell you tomorrow.

This has already been explained in depth through viewtopic.php?f=9&t=958979#p3512585 and https://github.com/joomla/joomla-cms/is ... -363508044

Joomla is not arbitrarily deleting records from the session table anymore when you use the database session handler, this operation is deferred to native PHP handling (as is the case with all other handlers). Joomla will only purge old records from that table when not using the database session handler and on a much shorter frequency than before the 3.8.4 release (the odds of the cleanup operation being fired have dropped from 50% in a minute to 20%).
Production Department Coordinator, Release Lead, CMS Maintainer, Framework Maintainer, Security Team Member, .org System Administrator

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3138
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Discuss Joomla! 3.8.5

Postby ribo » Mon Feb 12, 2018 1:39 pm

mbabker wrote:Joomla is not arbitrarily deleting records from the session table anymore when you use the database session handler, this operation is deferred to native PHP handling (as is the case with all other handlers).

Why it happens that? And what do you suggest? To not use database in session any more? And if we use php in session instead of database, will joomla be faster or slower?
chat room spontes : http://www.spontes.com

User avatar
layer8
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Mon Dec 05, 2011 4:37 am

Re: Discuss Joomla! 3.8.5

Postby layer8 » Mon Feb 12, 2018 1:44 pm

@mbabker I think you should add a new check for session.gc_probability in this part of the installation:
check.png
You do not have the required permissions to view the files attached to this post.

User avatar
mbabker
Joomla! Hero
Joomla! Hero
Posts: 2061
Joined: Sun Feb 28, 2010 8:26 pm
Location: White Bear Lake, MN, USA
Contact:

Re: Discuss Joomla! 3.8.5

Postby mbabker » Mon Feb 12, 2018 4:31 pm

ribo wrote:
mbabker wrote:Joomla is not arbitrarily deleting records from the session table anymore when you use the database session handler, this operation is deferred to native PHP handling (as is the case with all other handlers).

Why it happens that? And what do you suggest? To not use database in session any more? And if we use php in session instead of database, will joomla be faster or slower?

Joomla has two types of session data: The "real" session data (whose storage location is defined by the session handler configuration), and "optional" session metadata (this is what lets you see a list of logged in users in the backend or use the Who's Online module). The optional metadata is stored in the session database table regardless of handler configuration, and if using the database session handler then the "real" data is stored to that table as well.

Arbitrarily running the `DELETE FROM session` query as was the behavior at 3.8.3 and earlier meant that Joomla was performing PHP's session garbage collection task, but ONLY for the database handler (if using any other handler, this same arbitrary cleanup task was not happening). So Joomla's code has been giving preferential treatment to the database handler because it stores two types of data into one database table and to correctly remove stale records it has to delete both the optional metadata and the real data.

This arbitrary `DELETE FROM session` query was hardcoded to have a probably of running on 50% of requests (if the current time was an even numbered second). And has been a result of performance issues on some sites. The changes introduced into 3.8.4:

- Changed this probability from 50% to 20%, running only on a second that is an even divisor of 5, resulting in a less frequent cleanup operation
- Changed the cleanup operation from running at the beginning of the request to the end of the request (after the HTML document is sent to the user's browser), giving a minor performance enhancement by not having this task block processing the rest of the request
- Changed the logic so that it truly only operates as a cleanup handler for the optional metadata aspect of that data storage, making the native PHP garbage collection handling consistent for all database handlers instead of having in essence a different behavior for the database storage versus other stores

No, the current state is not optimal. Yes, things are continuing to be changed. I have mentioned in several places here on the forum and on GitHub what needs to be done to get things to the most optimal state. These tasks include extracting the metadata management code to a separate PHP class so that we can create tools to run this cleanup outside of web requests (i.e. cron jobs), moving the optional data to a separate database table (which would remove the check if the database handler is in use because we would always need to manage this table versus it having shared responsibilities with the native PHP handling of sessions), or even going so far as to disabling this optional metadata tracking for sites not desiring these types of capabilities (which has rewards and tradeoffs alike).

If you have a site that is reliant on showing accurate "who's online" data, you have two viable options right now:

1) Change the session handler to any other handler; there should be minimal if any performance gain or tradeoff depending on option (if your site supports Memcached as an example, you're trading a network request to your database server for a network request to your Memcached server; using the "PHP" handler trades a network request to your database server for a filesystem read/write operation)
2) If using the database session handler, create a cron job which in effect mimics the behavior of https://github.com/joomla/joomla-cms/bl ... #L166-L185 which will in effect restore 3.8.3 and earlier behavior but will be based on a set schedule versus an arbitrary decision made by the web application class
Production Department Coordinator, Release Lead, CMS Maintainer, Framework Maintainer, Security Team Member, .org System Administrator

Manually updating Joomla? See https://gist.github.com/mbabker/d7bfb4e1e2fbc6b7815a733607f89281

uurrvv55
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 14, 2018 3:35 pm

Joomla 3.8.5: The _session database table is not cleaned and grow rapidly

Postby uurrvv55 » Wed Feb 14, 2018 3:37 pm

Hello!
After updating the site from joomla 3.8.3 to 3.8.5, the database table _session, began to rapidly increase ~ 400 MB per day and is not cleared at the set time, attendance is 3-5 K per day. The session handler is the database, I put the session handler - I do not have access to the admin panel.
Every day I clean the _session table manually, logs to / var / log - did not tell anything. Tell me how to get rid of the problem.

User avatar
sozzled
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4240
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Joomla 3.8.5: The _session database table is not cleaned and grow rapidly

Postby sozzled » Wed Feb 14, 2018 3:54 pm

Please see viewtopic.php?f=9&t=958979&p=3512954#p3512954 for the explanation and solution.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

uurrvv55
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 14, 2018 3:35 pm

Re: Discuss Joomla! 3.8.5

Postby uurrvv55 » Wed Feb 14, 2018 4:17 pm

layer8 wrote:If you session table is huge and your site is slow after update to J.3.8.5, you just need to go to your PHP configuration and set session.gc_probability to 1


Does not work, - garbage is not deleted

After updating the site from joomla 3.8.3 to 3.8.5, the database table _session, began to rapidly increase ~ 400 MB per day and is not cleared at the set time, attendance is 3-5 K per day. The session handler is the database, I put the session handler - I do not have access to the admin panel.
Every day I clean the _session table manually, logs to / var / log - did not tell anything. Tell me how to get rid of the problem.

Put session.gc_probability on 1 - does not work, garbage accumulates and remains in the database. Only after the end of the session re-enter the admin area

Since the first version of joomla 1.5, when I have not seen one, - the base for 1 day with 20 MB, grows to 400 MB!

Here's the cron cleans the component cache:
rm -r /home/admin/web/site.com/public_html/cache/com_component
Tell me which command to clear the _session table through cron? Debian Server 8.10

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3138
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Discuss Joomla! 3.8.5

Postby ribo » Thu Feb 15, 2018 11:47 pm

Do you use smart search?
chat room spontes : http://www.spontes.com

BillyS
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Sat Nov 26, 2005 9:10 pm

Re: Discuss Joomla! 3.8.5

Postby BillyS » Sun Feb 18, 2018 6:28 pm

First off, I want to thank you all for maintaining Joomla, very much appreciated.

I also had my session handler set to database and it grew quite large. Looking at the above, I changed it to php and cleared the session table in the database. I noticed that the table is starting to grow again. That doesn't seem right to me. The session handler is definitely set to php. Is there some reason Joomla is still writing to the database table? Is there a php setting I should be setting? I tried finding information, but a lot of it is outdated.

BillyS

User avatar
effrit
Joomla! Explorer
Joomla! Explorer
Posts: 314
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: Discuss Joomla! 3.8.5

Postby effrit » Sun Feb 18, 2018 7:09 pm


BillyS
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Sat Nov 26, 2005 9:10 pm

Re: Discuss Joomla! 3.8.5

Postby BillyS » Mon Feb 19, 2018 1:13 pm

BillyS wrote:First off, I want to thank you all for maintaining Joomla, very much appreciated.

I also had my session handler set to database and it grew quite large. Looking at the above, I changed it to php and cleared the session table in the database. I noticed that the table is starting to grow again. That doesn't seem right to me. The session handler is definitely set to php. Is there some reason Joomla is still writing to the database table? Is there a php setting I should be setting? I tried finding information, but a lot of it is outdated.

BillyS


After initially growing, the session table appears to have stablized and appears to be working correctly at this point. Sorry about the false alarm.


Return to “Announcements Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests