|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchessession-locking-php.ini-configuration (last revision 2012-12-07 11:00 UTC by marc dot neudert at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-03-25 16:36 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-03-25 16:36 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 19:00:02 2025 UTC |
Description: ------------ The session locking introduced with pecl-memcache-3.0.4 uses a steadily increasing wait time (from 5ms up to 1000ms) until the session is unlocked. When sending several parallel AJAX requests (or lots in fast succession), you often end up at the max waiting time of 1000ms. This could make apps somewhat unresponsive if they are heavily AJAX dependent. @see #22462 @see #58726 Test script: --------------- server-side: <?php $session = session_start(); usleep(100000); // sleep 100 ms ?> client-side: <script language="text/javascript"> for (var i = 0; i < 10; i++) { xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET","http://localhost/session_lock.php?"+i,true); xmlhttp.send(); } </script> Expected result: ---------------- In an optimal case (and without using session_write_close()) each of the 10 AJAX requests would be executed once the previous one is finished. Therefore taking around 1.x seconds for all 10 requests. Actual result: -------------- Due to the increasing locking wait times the total time taken is far beyond that (depending on the server you could expect 5s total).