Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.12, 4.5.6
-
Fix Version/s: 4.7.11
-
Component/s: None
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
Symptom is that on a machine with insufficient php threads refreshing the dashboard with too many dashlets can tie up all php threads without apparently timing out. The server is effectively crashed for web use by this. I believe what happens is that because each dashlet is called by the browser at once the browser calls can grab all the threads, leaving no threads for CiviCRM to generate the responses to the php calls against it & leaving it indefinitely hanging.
While the problem can be addressed by increasing php threads CiviCRM should be a lot more graceful in this situation.
We theorised that the old http request handler may not be managing this situation as well as a modern one like guzzle
The function
static function getServerResponse($url, $addCookie = TRUE) {
calls the old PEAR require_once 'HTTP/Request.php';
I did try a couple of things within the function ie.
$request = new HTTP_Request($url, array('timeout' => 20));
& an error wrapper
if (!PEAR::isError($request->sendRequest()))
But not sure if they helped
Attachments
Issue Links
- supplements
-
CRM-14126 HttpClient.php library used by CiviCRM issues a PHP warning when open_basedir is set
- Reopened