Read more

Get information about current running passenger processes

Claus-Theodor Riegg
January 31, 2018Software engineer at makandra GmbH

With passenger-status --show=requests you can get a huge JSON showing current information about the running passenger processes.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This can be useful if you want to find out what a passenger process is doing at the moment (for e.g. if one worker seems to be stuck):

  * PID: 4273    Sessions: 1       Processed: 47      Uptime: 50m 53s
    CPU: 43%     Memory  : 3644M   Last used: 49m 24s ago
    Shutting down...

This passenger process is using too much memory and seems it's Last used timestamp is old. The worker is processing a extremely long running request or is stuck. You can search for the PID of the process in passenger-status --show=requests:

# (this is just a snippet)
               "last_data_receive_time" : {
                  "local" : "Wed Jan 31 12:26:51 2018",
                  "relative" : "49m 23s ago",
                  "relative_timestamp" : -2962.9902181625366,
                  "timestamp" : 1517398011.2357969
               },
               "last_data_send_time" : null,
               "method" : "GET",
               "path" : "/admin/search_user?query=4",
               "refcount" : 1,
               "request_body_already_read" : 0,
               "request_body_fully_read" : true,
               "request_body_type" : "NO_BODY",
               "response_begun" : false,
               "session" : {
                  "gupid" : "18asd3ed-U4FSeggT0O",
                  "pid" : 4273
               },
  • "last_data_send_time" : null, tells me, that this process did not return any data to the client
  • "path" : "/admin/search_user?query=4", shows me the request caused the issue
  • "last_data_receive_time" : { "local" : "Wed Jan 31 12:26:51 2018", shows me when the request came in
Posted by Claus-Theodor Riegg to makandra Operations (2018-01-31 13:28)