Replies: 4 comments
-
Nothing's going to change in 3.x at this point. You're going to have to core hack to get the result you want. In 4.0, the session metadata can be turned off. That eliminates the queries at the start of every request when the session is started. As for the rest of what you're suggesting (no sessions for bots, read-only versus read-write, etc.) you would seriously be better off trying to implement your own frontend application and session service versus trying to patch these types of features into Joomla. The session service is started at a point in the request cycle where the only information it has out of your list is enough to decide "start the session with an in-memory provider instead of a persistent provider for a bot", so none of the read-only versus read-write bits could be handled efficiently. As for the replication bit, you should be able to set Joomla to use Redis as the storage layer and configure that to handle the replication without Joomla needing to be able to handle that internally. And on the locking part, it works for files because internally PHP's C code is dealing with file locks; looking around the ecosystem the only other place I've seen a session locking mechanism at the storage layer is Symfony's PDO handler. |
Beta Was this translation helpful? Give feedback.
-
well,i hope you don't mean to swith my "frontend joomla application" to my "own frontend application" as i thought that we are here to make joomla better. i am not talking about 1 joomla site, i manage tens of servers with thousands of joomla sites that are hit with this issue (excessive session metadata rows and files data usage). i will investigate the possiblities to take over session handling on j4 and see if it gets better there. best regards, stan This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29405. |
Beta Was this translation helpful? Give feedback.
-
You'd basically need your own implementation of Like I said, a lot of the things you're looking for can't be wired up in a way that's generically usable because of the order of operations in executing the Joomla application (the session is started very early in the application bootup in trying to work out what plugins to load and certain frontend parameters (i.e. language) to use, which is well before any extensions are loaded, or the request has been routed anywhere; at that point it is pretty much impossible to efficiently say "this request requires a read-only interface to the session data, it will not write anything" or anything similar). |
Beta Was this translation helpful? Give feedback.
-
This proposal looks like an improvement to me. It supports the Open Closed Principle, as it allows to provide custom session handlers without the need to change core code. If not done already, this should be considered for J4. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29405. |
Beta Was this translation helpful? Give feedback.
-
Introduction:
We are using Joomla with ecommerce extensions on highly visited sites. It seems that Joomla's session system is the largest bottleneck of Joomla performance and scalability, because it does not provide means to completely extend or override it without core modifications. Our goal is to provide:
with the current way of session implementation, each cookie-less (or cookie-ignorant - googlebot) visit creates a new session which creates a new entry in joomla's #__session table and also a new file when PHP files session handling is used. In many cases our customers are reaching 50 000 to 300 000 sessions a day due to the above reasons and you can easily imagine, this is a huge performance and replication problem.
For the above reasons i would like to suggest a simple workaround to allow 3rd party session handling properly:
\libraries\src\Factory.php
Updated function:
original joomla session handling always starts session with
regardless of configured session handler within the configuration.
thank you, best regards, stAn
Beta Was this translation helpful? Give feedback.
All reactions