Get information about current running passenger processes
With passenger-status --show=requests you can get a huge JSON showing current information about the running passenger processes.
This can be useful if you want to find out what a passenger process is doing at the moment (for example 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 an 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