Welcome Guest, Not a member yet? Register   Sign In
Do not use the CI 4 session library
#4

(This post was last modified: 03-28-2024, 07:01 AM by ElTomTom.)

(03-26-2024, 04:04 PM)joho Wrote:
(03-25-2024, 07:14 AM)ElTomTom Wrote: Today I have the PHP Session with Redis configuration, with fallback, name configuration, etc., all defined in my php.ini file, however in CI4 I cannot use PHP's native session_start() to create my sessions.

[..]

Just out of curiosity, because I use PHP session settings geared for Redis too, what is it with CI4 sessions that doesn't work with PHP sessions using Redis?
I don't use it because of the lock it applies to sessions via Redis.
This is most evident in AJAX requests. At least in CI 3, a page that had about 5 requests took a long time for the page to finish loading all the information, as each page remained locked for 1s. In other words, in total I had 5s loading the data to be able to work.

On a large scale, this generates other problems, such as too many connections in the database
Imagine you open 5 req, each one opens a database connection. They will remain open for an average of 5 seconds for a page/user.

Now you have 10 users, making the same request, there are 50 active requests (10 users x 5 req) in the database that cannot be used by other people.
Reply


Messages In This Thread
Do not use the CI 4 session library - by ElTomTom - 03-25-2024, 07:14 AM
RE: Do not use the CI 4 session library - by joho - 03-26-2024, 04:04 PM
RE: Do not use the CI 4 session library - by ElTomTom - 03-28-2024, 06:57 AM
RE: Do not use the CI 4 session library - by joho - 03-28-2024, 07:49 AM
RE: Do not use the CI 4 session library - by joho - 03-28-2024, 04:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB