Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.2.4, 2.2.5, 2.2.6, 2.2.7
-
Fix Version/s: 2.2.9
-
Component/s: Standalone CiviCRM
-
Labels:None
Description
In standalone, checkURL deadlocks when $addCookie is true.
CiviCRM Standalone uses PHP sessions, which cannot be accessed concurrently.
When checkURL sends a request, that request's PHP interpreter blocks on session_start() [standalone/bootstrap.php line 2] until the session is free. The session never becomes free, since checkURL is waiting for the request to return.
The user experience is that the "Resource URLs" form hangs during save, and all following CiviCRM pageloads hang, until they clear their browser cookies.
On the server side, the hung PHP interpreters stay resident for a surprisingly long time (at least an hour). They can be cleared out by restarting Apache.
Neither Drupal or Joomla is affected by this bug, since Drupal does not use PHP sessions, and Joomla frees its PHP sessions before CiviCRM is called (using session_write_close() )
This bug was introduced in 2.2.4, with the fix for CRM-4447
Previously, checkURL used a "HEAD" request instead of a "GET" – which did not trigger session_start()