# Sidekiq stops after some time

**URL:** <https://meta.discourse.org/t/sidekiq-stops-after-some-time/267777>\
**Category:** Self-hosting\
**Created:** [June 9, 2023, 9:54am UTC](https://meta.discourse.org/t/sidekiq-stops-after-some-time/267777 "2023-06-09T09:54:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![trobiyo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trobiyo/32/311872_2.png) [@trobiyo](https://meta.discourse.org/u/trobiyo)\
**Post date:** [June 12, 2023, 4:34pm UTC](https://meta.discourse.org/t/sidekiq-stops-after-some-time/267777/4 "2023-06-12T16:34:38Z")

</div>

Hi,

If I’m not mistaken, you have to set `DISCOURSE_LOG_SIDEKIQ` env variable to `1`, as per [discourse/app/jobs/base.rb at 7c768a2ff99f45ab5008c16cf6982652d576a0e2 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/7c768a2ff99f45ab5008c16cf6982652d576a0e2/app/jobs/base.rb#L132), otherwise the `write_to_log` function will return without dumping the log (see [discourse/app/jobs/base.rb at 7c768a2ff99f45ab5008c16cf6982652d576a0e2 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/7c768a2ff99f45ab5008c16cf6982652d576a0e2/app/jobs/base.rb#L124))

Hope this helps.

---

_[View the full topic](https://meta.discourse.org/t/sidekiq-stops-after-some-time/267777)._
