This simple code will freeze php-fpm:
<?php
while (1 != 0) {
apcu_store ("mykey", "123qwe");
apcu_fetch ("mykey");
}
If you have request_terminate_timeout = 3, you can run apcu.php with this code:
#!/bin/sh
while [ 0 != 1 ]; do
SCRIPT_FILENAME=/tmp/php-apcu/apcu.php \
REQUEST_METHOD=GET \
cgi-fcgi -bind -connect 127.0.0.1:9000
sleep 3
done
cgi-fcgi is a tool, that allows you to run code on php-fpm directly, without webserver.