?
avatar rovexo
rovexo
27 Dec 2017

Steps to reproduce the issue

  • Use memcache (or memcached) as session handler in Joomla config
  • Login (either site or admin)
  • See PHP error logs

Using memcache (also memcached) as session handler seems make a delay in logins (site and admin) for about 15s but succeeds eventually. PHP notice says (immediately after hitting 'login'):

4096: session_regenerate_id(): Failed to create(read) session ID
in
/libraries/joomla/session/handler/native.php on line:151

memcache does seem work normal for Joomla's caching (and usage in another extension using the native functions).

Interestingly wait time is almost precisely the time of setting memcache.lock_timeout (15s)

The PHP notice comes immediately after hitting 'login', then the 15s, then the redirect to the backend.

I tried memcache and memcached as cache handlers, the session issue is the same in both cases.

Hope that helps!

System information

Software versions

Ubuntu 16.04 (all original repos)
nginx 1.11.10
PHP 7.0.22 via FPM SAPI
Joomla 3.8.3 (no non-joomla auth or login plugins)
memcached 1.4.25 (hosted on same box, accessed via standard port and localhost as hostname)

memcache php module: 3.0.9-dev
memcached php module: 2.2.0
libmemcached version: 1.0.18

memcache PHP info copy/paste:

memcache
memcache support enabled
Version 3.0.9-dev
Revision $Revision$
Directive Local Value Master Value
memcache.allow_failover 1 1
memcache.chunk_size 32768 32768
memcache.compress_threshold 20000 20000
memcache.default_port 11211 11211
memcache.hash_function crc32 crc32
memcache.hash_strategy consistent consistent
memcache.lock_timeout 15 15
memcache.max_failover_attempts 20 20
memcache.protocol ascii ascii
memcache.redundancy 1 1
memcache.session_redundancy 2 2

From Joomla configuration:

session_handler memcache
memcache_persist 1
memcache_compress 0
memcache_server_host localhost
memcache_server_port 11211
memcached_persist 1
memcached_compress 0
memcached_server_host localhost
memcached_server_port 11211

attached you also find the full PHP info text file.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar rovexo rovexo - open - 27 Dec 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Dec 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Dec 2017
Category Libraries
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Jan 2018

Anyone Experience with Memcache and can comment this Issue?


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Jan 2018
Status New Information Required
avatar brianteeman brianteeman - change - 23 Mar 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-03-23 22:51:37
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 23 Mar 2018

i am going to close this as their have been a lot of changes to this part of the code base since the report. If it is still an issue with the current release it can always be reopened

avatar brianteeman brianteeman - close - 23 Mar 2018
avatar gundestrup
gundestrup - comment - 3 Apr 2018

I am still having this as an issue, on 3.8.5
Getting errors like
Warning: session_start(): Unable to clear session lock record in /home/svgu/gl-oelstykke.dk/libraries/joomla/session/handler/native.php on line 260

Warning: session_start(): Failed to read session data: memcached (path: localhost:11211) in /home/svgu/gl-oelstykke.dk/libraries/joomla/session/handler/native.php on line 260
Error: Failed to start application: Failed to start the session

avatar PhilETaylor
PhilETaylor - comment - 29 May 2018

@gundestrup @rovexo Have you experienced this issue with Joomla 3.8.8 please?

avatar gundestrup
gundestrup - comment - 12 Jun 2018

I have it's still the same. Switched to php again.

On Tue, May 29, 2018 at 6:47 PM Phil Taylor notifications@github.com
wrote:

@gundestrup https://github.com/gundestrup @rovexo
https://github.com/rovexo Have you experienced this issue with Joomla
3.8.8 please?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#19189 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB4TyHp_to-dAbGGWA4Hfa19NG9Xj1Pks5t3XtXgaJpZM4RN3Az
.

--
Svend Gundestrup, MD
Medical Developer & Logistics

avatar PhilETaylor
PhilETaylor - comment - 12 Jun 2018

are you 100% sure the memcache server is running? As I can replicate this with mysql, if the mysql connection details are invalid or the mysql server is offline.

avatar loureirorg
loureirorg - comment - 23 Apr 2019

Same issue:

  • Joomla!: 3.9.3
  • PHP 7.1.28-1
  • Memcached: 3.1.3 (connected through unix socket)
  • OS: Ubuntu 16.04.1

Messages:
Warning: session_start(): Unable to clear session lock record in /var/www/mysite/staging/libraries/joomla/session/handler/native.php on line 260
Warning: session_start(): Failed to read session data: memcached (path: /tmp/memcached.sock:11211) in /var/www/mysite/staging/libraries/joomla/session/handler/native.php on line 260
Error: Failed to start application: Failed to start the session


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Apr 2019

@loureirorg please update on latest Version.

avatar HLeithner
HLeithner - comment - 24 Apr 2019

@loureirorg could you please create a new issue because your report is unrelated to the original issue, also I think the reason is because we are unable to connect to UDS, I create a PR #24073 that is not tested so it can't be merged.

Please test the PR and mark it as successful so we can merge it into Joomla.

Add a Comment

Login with GitHub to post a comment