# Can't start development instance-- renice: failed to set priority

**URL:** https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375
**Category:** Development
**Created:** [May 17, 2023, 6:35pm UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375 "2023-05-17T18:35:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 17, 2023, 6:35pm UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/1 "2023-05-17T18:35:41Z")

</div>

I don’t know what might have changed since the last time I cranked up this dev instance, but now it’s failing like this:

```plaintext
Sidekiq client with Sidekiq::RedisConnection::RedisAdapter options {:host=>"localhost", :port=>6379, :namespace=>"sidekiq"}
Sidekiq client with Sidekiq::RedisConnection::RedisAdapter options {:host=>"localhost", :port=>6379, :namespace=>"sidekiq"}
Sidekiq client with Sidekiq::RedisConnection::RedisAdapter options {:host=>"localhost", :port=>6379, :namespace=>"sidekiq"}
I, [2023-05-17T13:31:56.328911 #1103707] INFO -- : worker=0 ready                                                           
I, [2023-05-17T13:31:56.330855 #1103710] INFO -- : worker=1 ready                                                         
Loading Sidekiq in process id 1103706                                                                                        
Sidekiq client with Sidekiq::RedisConnection::RedisAdapter options {:host=>"localhost", :port=>6379, :namespace=>"sidekiq"}  
/home/pfaffman/src/discourse-repos/discourse/lib/discourse.rb:137:in `exec': renice: failed to set priority for 1103706 (proc
ess ID): Permission denied                                                                                                   
/home/pfaffman/src/discourse-repos/discourse/lib/discourse.rb:171:in `execute_command'   
/home/pfaffman/src/discourse-repos/discourse/lib/discourse.rb:137:in `exec'                                             
/home/pfaffman/src/discourse-repos/discourse/lib/discourse.rb:33:in `execute_command'                                
/home/pfaffman/src/discourse-repos/discourse/lib/demon/sidekiq.rb:51:in `after_fork'
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:155:in `block in run'                            
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:151:in `fork'
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:151:in `run'                                                  
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:146:in `start'                                   
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:14:in `block in start'                                        
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:14:in `times'                                               
/home/pfaffman/src/discourse-repos/discourse/lib/demon/base.rb:14:in `start'                                                 
/home/pfaffman/src/discourse-repos/discourse/config/unicorn.conf.rb:89:in `block in reload'                                  
/home/pfaffman/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:541:in `spawn_missing_workers'                                                                                                                 
/home/pfaffman/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:143:in `start'
/home/pfaffman/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/home/pfaffman/src/discourse-repos/discourse/bin/unicorn:96:in `load'                
/home/pfaffman/src/discourse-repos/discourse/bin/unicorn:96:in `block in <main>'    
/home/pfaffman/src/discourse-repos/discourse/bin/unicorn:95:in `fork'                                           
/home/pfaffman/src/discourse-repos/discourse/bin/unicorn:95:in `<main>'                                                      
I, [2023-05-17T13:31:56.356176 #1103713] INFO -- : worker=2 ready                                                         
E, [2023-05-17T13:31:56.452446 #1103437] ERROR -- : reaped #<Process::Status: pid 1103706 exit 1> worker=unknown             
Detected dead worker 1103706, restarting...                                                                                  
 

```

And I did the only other thing I could think of: reboot. 🦐 (the person shrugging emoji seems to be missing–and I just rebooted–I guess they’re trying to try out the new font awesome icons–so here’s a shrimp.)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 18, 2023, 5:02pm UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/2 "2023-05-18T17:02:06Z")

</div>

I’m still confused on this one. I commented out this line in `lib/demon/sidekiq.rb`:

```
     #Discourse::Utils.execute_command("renice", "-n", "5", "-p", Process.pid.to_s)

```

That line’s been there for 4 years and it worked the last time I cranked this up. I don’t know what might have changed. Kernel upgrade, maybe? But that doesn’t make sense either.

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [May 19, 2023, 7:58am UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/3 "2023-05-19T07:58:11Z")

</div>

An update to the docker image could have included an update to utilities such as renice. Or some kind of policy update within the container might have got in the way, if for example different UIDs are used for different processes in different ways. Or possibly the base priority has changed so the renice is now trying to increase priority, which it can’t do.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 19, 2023, 10:00am UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/4 "2023-05-19T10:00:15Z")

</div>

This is for a dev instance on Linux, not in the container. Seems strange that I’m the only one, but I’m often able to do silly things that no one else thinks of.

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [May 19, 2023, 10:11am UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/5 "2023-05-19T10:11:50Z")

</div>

Ah, sorry - I have no experience with dev instances.

---

<div class="post-metadata">

### Author: ![andromedarabbit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andromedarabbit/32/119385_2.png) [@andromedarabbit](https://meta.discourse.org/u/andromedarabbit)
#### Post date: [July 27, 2023, 1:07pm UTC](https://meta.discourse.org/t/cant-start-development-instance-renice-failed-to-set-priority/265375/6 "2023-07-27T13:07:34Z")

</div>

Same here. I found the same problem just a few hours ago on my local Kubernetes.

```plaintext
E, [2023-07-27T13:09:27.525053 #74] ERROR -- : reaped #<Process::Status: pid 456 exit 1> worker=unknown
Detected dead worker 456, restarting...
/var/www/discourse/lib/discourse.rb:137:in `exec': renice: failed to set priority for 483 (process ID): Permission denied
/var/www/discourse/lib/discourse.rb:171:in `execute_command'
/var/www/discourse/lib/discourse.rb:137:in `exec'
/var/www/discourse/lib/discourse.rb:33:in `execute_command'
/var/www/discourse/lib/demon/sidekiq.rb:51:in `after_fork'
/var/www/discourse/lib/demon/base.rb:155:in `block in run'
/var/www/discourse/lib/demon/base.rb:151:in `fork'
/var/www/discourse/lib/demon/base.rb:151:in `run'
/var/www/discourse/lib/demon/base.rb:146:in `start'
/var/www/discourse/lib/demon/base.rb:132:in `ensure_running'
/var/www/discourse/lib/demon/base.rb:31:in `block in ensure_running'
/var/www/discourse/lib/demon/base.rb:31:in `each'
/var/www/discourse/lib/demon/base.rb:31:in `ensure_running'
config/unicorn.conf.rb:243:in `master_sleep'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/unicorn-6.1.0/lib/unicorn/http_server.rb:295:in `join'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/unicorn-6.1.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/bin/unicorn:25:in `<main>'

```
