|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74756 APCu: apcu_entry freezing/hanging
Submitted: 2017-06-13 21:51 UTC Modified: 2017-10-24 08:49 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: vpillinger at gmail dot com Assigned:
Status: Open Package: APC (PECL)
PHP Version: 7.0.20 OS: Windows 10
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.
Block user comment
Status: Assign to:
Bug Type:
From: vpillinger at gmail dot com
New email:
PHP Version: OS:


 [2017-06-13 21:51 UTC] vpillinger at gmail dot com
When the value is already initialized in the apcu cache, apcu is hanging/freezing in an unpredictable manner. It often happens on the first request after not hitting the script for a few minutes, or sometimes after hitting the script repeatedly.

Test script:
function loadCSV($file_path) {
  $rows = array_map('str_getcsv', file($file_path));
  $header = array_shift($rows);
  $csv = array();
  foreach($rows as $row) {
    $csv[] = array_combine($header, $row);
  return $csv;

$degrees = apcu_entry('degreeList.csv', 'loadCSV');
echo json_encode($degrees);

Expected result:
apcu_entry should never hang, freeze, or deadlock.

Actual result:
apcu_entry freezes under low load testing conditions.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 08:49 UTC]
-Summary: apcu_entry freezing/hanging +Summary: APCu: apcu_entry freezing/hanging
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC