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

Simple Things Added Of Life and SleepItself https://t.co/tjE5iuA3DC

How to use react-hook-form with react-native integrate validate and more via typescript (signup…

Post on Technology Stack

Fast and Furious Images —  Web Performance Tuning Tips

Merge Sort JavaScript

Static site generation with NextJs and a headless CMS

!!null = false: How to evaluate any expression to a boolean

Node worker threads

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

Configuring Laravel 7 For Use With PhpRedis using Homestead

Easily Use Laravel Query Scopes

Cloudinary-image-upload-laravel

SEO-friendly breadcrumbs in Laravel that Google will love

A newspaper, a sweater, a notebook with Google opened in the browser, a pitcher full of flowers — on a wooden table. Four wooden chairs around it.