krakjoe / apcu

APCu - APC User Cache
Other
964 stars 196 forks source link

Apcu crashes php-fpm #405

Open churiart opened 4 years ago

churiart commented 4 years ago

After upgrading from 5.1.9 to 5.1.19, php-fpm process exits on invoking apcu_* functions (store and delete I can confirm):

[20-Oct-2020 11:12:20] WARNING: [pool www] child 16 exited with code 127 after 40.209549 seconds from start
[20-Oct-2020 11:12:20] NOTICE: [pool www] child 46 started

and nginx

Oct 20 11:12:20 trumpet nginx: 2020/10/20 11:12:20 [error] 26#26: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.18.0.1, server: _, request: "POST /... HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "localhost", referrer: "http://localhost/..."

There are no hints as why it occurs. Also it isn't obvious how internal debugging feature of apcu works so that we could see some logs.

xvzf commented 3 years ago

@churiart did you find a solution? we have a similar situation atm

churiart commented 3 years ago

@xvzf No nothing. Had to downgrade.

TysonAndre commented 2 years ago

APCu 5.1.20 had some fixes that may have been relevant https://pecl.php.net/package-changelog.php?package=APCu&release=5.1.22 (have you tried 5.1.22 with php 8.1 or older?)

  1. What were your ini settings? Were you using apc.serializer=default or apc.serializer=php (the former has issues that may or may not have been fixed)
  2. Which php version? (EDIT: oh, it says php 7.2)
  3. Is that on any call to apcu_store or just certain values? Does it also happen in the cli with apc.enable_cli=1?
  4. Which OS?
- Fix handling of references in PHP 8 if "default" serializer is used (which is not the default).
- Fix string reuse handling if "default" serializer is used (which is not the default).