title: Passenger Core Shutdown With No Known Cause
body: <p>I have an instance of Passenger (Apache/Linux) that shutdown in a way I have never observed before and I can't find anything similar online. I'm including the log entries immediately before and after the event below. </p>
  
  <p>Basically the Passenger Core shut down without any error or even evidence of a SIGTERM. I'm unable to replicate this behavior and that worries me as I can't ensure it won't happen again if I can't reproduce it or determine the cause.</p>
  
  <p>I have seen many reports of "Signal received. Gracefully shutting down..." followed by "Received command to shutdown gracefully." But in all cases there is a cause like "Passenger watchdog killed" or "caught SIGTERM, shutting down". In this case there is nothing, zilch, nada. The server was operating normally and then it was shutting down "gracefully".</p>
  
  <p>stdout: Using <code>/usr/local/rvm/gems/ruby-2.1.0</code></p>
  
  <pre><code>[passenger_native_support.so] not compiling because PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0
  
  [passenger_native_support.so] not downloading because PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0
  
  [passenger_native_support.so] will not be used (can't compile or download)
  --&gt; Passenger will still operate normally.
  
  [ 2017-09-19 18:04:40.9563 11820/7f675ae4d700 age/Cor/CoreMain.cpp:907 ]: Checking whether to disconnect long-running connections for process 28420, application 
  
  [ 2017-09-19 18:04:45.2712 11820/7f675ae4d700 age/Cor/CoreMain.cpp:907 ]: Checking whether to disconnect long-running connections for process 29329, application 
  
  **[ 2017-09-19 18:04:46.9925 11820/7f6754dea700 age/Cor/CoreMain.cpp:585 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)**
  
  **[ 2017-09-19 18:04:46.9926 11820/7f675ae907e0 age/Cor/CoreMain.cpp:989 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...**
  
  [ 2017-09-19 18:04:46.9927 11820/7f675ae907e0 age/Cor/CoreMain.cpp:907 ]: Checking whether to disconnect long-running connections for process 14535
  
  [ 2017-09-19 18:04:46.9929 11820/7f675ae907e0 age/Cor/CoreMain.cpp:907 ]: Checking whether to disconnect long-running connections for process 31837
  </code></pre>
  
  <p>[There are a bunch more of these "Checking whether to disconnect" messages]</p>
  
  <pre><code>[ 2017-09-19 18:04:47.0046 11820/7f670a1fc700 Ser/Server.h:817 ]: [ApiServer] Freed 0 spare client objects
  
  [ 2017-09-19 18:04:47.0047 11820/7f670a1fc700 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
  
  [ 2017-09-19 18:04:47.0048 11820/7f673cdfa700 Ser/Server.h:817 ]: [ServerThr.7] Freed 128 spare client objects
  
  [ 2017-09-19 18:04:47.0056 11820/7f673cdfa700 Ser/Server.h:464 ]: [ServerThr.7] Shutdown finished
  
  [ 2017-09-19 18:04:47.0081 11820/7f673f5fe700 Ser/Server.h:817 ]: [ServerThr.3] Freed 128 spare client objects
  
  [ 2017-09-19 18:04:47.0089 11820/7f673f5fe700 Ser/Server.h:464 ]: [ServerThr.3] Shutdown finished
  </code></pre>
  
  <p>[There are a bunch more of these "Freed 128 spare" and "Shutdown finished" messages]</p>
  
  <pre><code>**[ 2017-09-19 18:05:01.3870 11820/7f675ae907e0 age/Cor/CoreMain.cpp:1055 ]: Passenger core shutdown finished**
  
  [Tue Sep 19 18:05:02 2017] [notice] child pid 11876 exit signal Segmentation fault (11)
  
  [Tue Sep 19 18:05:02 2017] [notice] child pid 11877 exit signal Segmentation fault (11)
  </code></pre>