php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72664 accessing session is very slow when ajax request
Submitted: 2016-07-24 15:24 UTC Modified: 2016-07-24 19:14 UTC
From: saravanan dot swaminathan at kgfsl dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 7.0.9 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: saravanan dot swaminathan at kgfsl dot com
New email:
PHP Version: OS:

 

 [2016-07-24 15:24 UTC] saravanan dot swaminathan at kgfsl dot com
Description:
------------
If I write data into session through ajax request, it takes more than 1 minute. If I trigger other javascript functions through other control, it return response quickly.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-24 19:08 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2016-07-24 19:08 UTC] yohgaki@php.net
Session data is locked while it is accessing. i.e. Access to resources is serialized.

If you would like to speed up, increase parallelism by using read only access (available since 5.6) or commit (session_commit) as soon as you don't need to update it.
 [2016-07-24 19:14 UTC] yohgaki@php.net
Beware that improper parallelism causes session data inconsistency. 

e.g. Open&Read session data and write&close session. Later on, session data is needed to be updated, so open&read and write&close again based on state that script is running. This kind of code may cause race condition (= inconsistency depends on execution order/state/etc)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC