# 502 unavailable after executing pkill Passenger

**URL:** <https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 27, 2023, 5:23am UTC](https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669 "2023-04-27T05:23:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![link89](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/link89/32/1621_2.png) [@link89](https://discourse.openondemand.org/u/link89)\
**Post date:** [April 27, 2023, 5:23am UTC](https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669/1 "2023-04-27T05:23:07Z")

</div>

I try to execute `pkill Passenger` to kill some background process tasks (watchdog, some ruby process, etc) and expect they will be recovered automatically. Turn out it was not, and now it just get stuck at nginx 502 error. What I suppose to do to make it right again?

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [April 27, 2023, 1:57pm UTC](https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669/2 "2023-04-27T13:57:15Z")

</div>

We have a cronjob that will stop PUNs that are idle. I believe it’s every hour, though I’d have to check. Look at `/etc/cron.d/ood` for the job itself. You may increase it’s frequency to stop idle PUNs more aggressively.

That said, I think you’d need to stop the top level nginx processes. You should use `/opt/ood/nginx_stage/sbin/nginx_stage` helper to stop the PUNs. All the processes’ they start are required, so you have to stop the entire nginx stack, not just one or two processes.

---

<div class="post-metadata">

**Author:** ![link89](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/link89/32/1621_2.png) [@link89](https://discourse.openondemand.org/u/link89)\
**Post date:** [April 27, 2023, 2:21pm UTC](https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669/3 "2023-04-27T14:21:36Z")

</div>

> [@jeff.ohrstrom](#):
>
> Look at `/etc/cron.d/ood` for the job itself. You may increase it’s frequency to stop idle PUNs more aggressively.

I see, that explains why it back to normal automatically 1 hour later.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [October 24, 2023, 2:21pm UTC](https://discourse.openondemand.org/t/502-unavailable-after-executing-pkill-passenger/2669/4 "2023-10-24T14:21:41Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
