|  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: 2018-02-23 12:00 UTC
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: vpillinger at gmail dot com Assigned: nikic (profile)
Status: Closed 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
 [2018-01-08 08:56 UTC] sailormax at inbox dot lv
I have similar problem when use APCu Non Thread Safe (NTS) x64 version with Winnmp server:

Each second refresh return error (or freeze, different on different versions) instead of page.
 [2018-02-23 12:00 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC