PHP FPM shutdown behavior

  1. we restart php-fpm while the script is still executing
  2. nginx terminates the connection because of fastcgi_timeout
  3. you send sigkill to fpm worker processes using kill command
  4. a fatal error occurs
  5. php runs out of allocated memory.
  6. max_execution_time is exceeded. (Is max_execution_time wall time or time spent executing processes AKA virtual time.)
strace output
strace output when kill command is used
public function connect(){
throw new \Exception('Something went wrong');
}
public function connect(){
$count = 0;
while($count<1000000){
$this->data[]='abhishek J';
$count++;
}
}
public function connect(){
while(true){
$count = 0;
}
}
public function connect(){
$s = time();
sleep(60);
$e = time();
echo $e-$s;
}

--

--

--

just a bug hunter and problem addict

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building a Messaging App with Python Sockets and Threads

Audit + Blue Paper

Integration of Huawei IAP in Unity

Exploring Python Data Structures — Stacks

COMPLEX THINGS made EASY.

Replacing nested if conditions in Object Oriented Way

Workshop: Computational Approaches to Sound

GRPC service for C# developers - A quick start

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhishek Jakhotiya

Abhishek Jakhotiya

just a bug hunter and problem addict

More from Medium

Static config variables on a Laravel project

Laravel — validate “true”​ or “false”​ as boolean

Laravel model presenters with the Reflection API

Reflection

Installing xdebug3 for PHP8 for mac users (PHPStorm + Laravel)