# Byebug comportando-se miseravelmente devido a múltiplos workers do unicorn em dev

**URL:** <https://meta.discourse.org/t/byebug-behaving-miserably-due-to-multiple-unicorn-workers-in-dev/96184>\
**Category:** Development\
**Created:** [Setembro 2, 2018, 6:07am UTC](https://meta.discourse.org/t/byebug-behaving-miserably-due-to-multiple-unicorn-workers-in-dev/96184 "2018-09-02T06:07:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)\
**Post date:** [Setembro 2, 2018, 6:07am UTC](https://meta.discourse.org/t/byebug-behaving-miserably-due-to-multiple-unicorn-workers-in-dev/96184/1 "2018-09-02T06:07:54Z")

</div>

Hello,

I’ve just had a miserable time using byebug within Discourse, due to the default `worker_processes` being set to 3 in `unicorn.conf.rb`.

If multiple web workers get stopped by byebug at the same time (for example, you put a byebug line in the `drafts#show` route, and hit that route twice during the course of development), you end up in a situation where byebug is unable to determine which process you’re typing input for. So, for example, with one stopped process you may type

```plaintext
(byebug) continue

```

to continue execution, but with two stopped processes you get

```plaintext
(byebug) continue
*** NameError Exception: undefined local variable or method `cntne' for #<Class>

```

😱 😱 😱

Even doubling up your input doesn’t really seem to work either:

```plaintext
(byebug) ccoonnttiinnuuee
*** NameError Exception: undefined local variable or method `cntinnue' for #<Class>

```

This leads to needing to shut down the server completely in order to continue, and happens every time multiple requests are halted by a byebug at once (which, for certain routes, can be quite often)

(NB that this behaviour happens with binding.pry as well)

The workaround is to run

```plaintext
UNICORN_WORKERS=1 bin/unicorn -p 3000

```

or otherwise set your UNICORN\_WORKERS ENV to 1 before booting the app.

I think this could be byebug’s problem (I’ve [filed a issue](https://github.com/deivid-rodriguez/byebug/issues/487) about it), but I wonder what the downsides would be of setting the worker count to 1 automatically in development?

---

_[View the full topic](https://meta.discourse.org/t/byebug-behaving-miserably-due-to-multiple-unicorn-workers-in-dev/96184)._
