개발 인스턴스 시작 불가 -- renice: 우선순위 설정 실패

마지막으로 이 개발 인스턴스를 구동한 이후에 무엇이 변경되었는지 모르겠지만, 이제 다음과 같은 방식으로 실패하고 있습니다:

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...                                                                                  
 

그리고 제가 떠올릴 수 있는 다른 유일한 조치인 재부팅을 수행했습니다. :shrimp: (어깨를 으쓱하는 이모지가 사라진 것 같네요. 방금 재부팅을 했거든요. 아마 새로운 폰트 애브 아이콘을 시험해 보고 있는 중인 것 같습니다. 그래서 새우 이모지를 사용했습니다.)

여전히 이 부분에 대해 혼란스럽습니다. lib/demon/sidekiq.rb 파일에서 이 줄을 주석 처리했습니다:

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

이 줄은 4년 전부터 있었고, 마지막으로 이 작업을 수행했을 때 정상적으로 작동했습니다. 무엇이 변경되었을지 모르겠습니다. 커널 업데이트 때문일까요? 하지만 그것도 말이 안 됩니다.

Docker 이미지 업데이트 시 renice와 같은 유틸리티의 업데이트가 포함되었을 수 있습니다. 또는 컨테이너 내부의 정책 업데이트가 방해가 되었을 수도 있습니다. 예를 들어, 서로 다른 프로세스에 서로 다른 방식으로 UID가 사용된 경우입니다. 아니면 기본 우선순위가 변경되어 renice가 우선순위를 높이는 것을 시도하고 있지만, 이를 수행할 수 없는 상황이 되었을 수도 있습니다.

이것은 컨테이너가 아니라 Linux의 개발 인스턴스를 위한 것입니다. 제가 이런 생각을 하는 사람이 저뿐인 것 같아 좀 이상하지만, 저는 종종 다른 사람들이 생각하지 못하는 황당한 짓을 하는 편입니다.

아, 죄송합니다 - 개발 인스턴스에 대한 경험이 없습니다.

저도 마찬가지입니다. 몇 시간 전 제 로컬 Kubernetes에서도 동일한 문제를 발견했습니다.

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>'