나는 특정 socksproxy 호출을하는 resque-pool을 사용하여 실행되는 간단한 백그라운드 작업을 가지고 있습니다. 내가 레일 개발 모드에서 resque 풀을 시작할 때이 내가 백그라운드 작업으로 연결 시간 제한에 충돌 최대한 빨리 생산 모드로 변경으로 잘 작동 생산에SOCKSProxy에 대한 연결 시간 초과 resque Rails 프로덕션 모드에서의 호출
- 레일 콘솔에서 실행될 때 동일한 코드가 작동
: 모드req = Net::HTTP::Get.new(uri.request_uri) response = Net::HTTP.SOCKSProxy(@socks_server, @socks_port).start(uri.host, uri.port) do |http| http.request(req) end
명령 줄에서 호출
- 독립 루비 스크립트는
통화 뭔가처럼 6,
조사 :
이 호출이 발생
TCPSocket.open(conn_address, conn_port, @local_host, @local_port)
net/http.rb
에 내가 생산 모드 작업자 자식 프로세스 대신로드에 여전히 루비에서로드 socksify-1.7.0/lib/socksify.rb
에서 TCPSocket
클래스 resolv-replace.rb
를 한 것으로 나타났습니다. 왜 그래도.
오류 난을 참조하십시오
연결 시간이 초과되었습니다 - (2) "에 대한"포트 6455에 연결 : /usr/lib/ruby/gems/2.1.0/gems/socksify-1.7.0/를 lib/socksify.rb : 178 :
initialize' /usr/lib/ruby/gems/2.1.0/gems/socksify-1.7.0/lib/socksify.rb:178:in
초기화 '/usr/lib/ruby/2.1.0/resolv-replace.rb:23:ininitialize' /usr/lib/ruby/2.1.0/net/http.rb:879:in
열기' /usr/lib/ruby/2.1.0/net/ http : rb : 879 :block in connect' /usr/lib/ruby/2.1.0/timeout.rb:76:in
시간 초과 ' /usr/lib/ruby/2.1.0/net/http.rb:878:inconnect' /usr/lib/ruby/2.1.0/net/http.rb:863:in
do_start' /usr/lib/ruby/2.1.0/net/http. rb : 852 :start' /usr/lib/ruby/2.1.0/net/http.rb:583:in
시작 ' /usr/lib/ruby/gems/2.1.0/ge ms/retries-0.0.5/lib/retries.rb : 46 :call' /usr/lib/ruby/gems/2.1.0/gems/retries-0.0.5/lib/retries.rb:46:in
with_retries ' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb : 177 : /usr/lib/ruby/gems/2.1.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:363:in `perform_action_with_newrelic_trace을 'around_perform_with_monitoring에block (3 levels) in perform' /usr/lib/ruby/gems/2.1.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/instrumentation/resque.rb:41:in
블록 'invoke_with_call_chain/usr/lib/ruby/gems/2.1.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/instrumentation/resque.rb:33:in
around_perform_with_monitoring' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb:176:in
블록 (2 단계) in ' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26을 수행하십시오. 0/lib/resque/job.rb : 172 :call' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb:172:in
블록 실행 ('3 레벨)'에서 ../app/jobs/resque_hooks.rb:15:inaround_perform_job_duration' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb:172:in
수행 중 블록 (2 레벨) 수행 ' /usr /lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb:184:incall' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/job.rb:184:in
수행 ' /usr/lib/ruby/gems/2.1.0/gems/ resque-1.26.0/lib/resque/worker.rb : 290 : inperform' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/worker.rb:229:in
작업중인 블록 ' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/worker .rb : 206 : inloop' /usr/lib/ruby/gems/2.1.0/gems/resque-1.26.0/lib/resque/worker.rb:206:in
work ' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.RB : 396 :block in spawn_worker!' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:389:in
포크 ' spawn_missing_workers_for에spawn_worker!' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:367:in
블록 /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:389:in' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:366:intimes' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:366:in
spawn_missing_workers_for ' /usr/lib/ruby/gems/2.1 .0/gems/resque-pool-0.6.0/lib/resque/pool.rb : 352 :block in maintain_worker_count' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:350:in
각 ' /usr/lib/gems/2.1.0/gems/resque-pool-0.6. 0/lib/resque/pool.rb : 350 : inmaintain_worker_count' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:263:in
시작 ' /usr/lib/ruby/gems/2.1.0/gems/resque-pool-0.6.0/lib/resque/pool.rb:89 : in ' /usr/lib/ruby/gems/2.1.0/gems/rake/11.2.2/lib/task.rb:248:in에서 0 블록 (2 레벨)call' /usr/lib/ruby/gems/2.1.0/gems/rake-11.2.2/lib/rake/task.rb:248:in
실행 블록' /usr /lib/ruby/gems/2.1.0/gems/rake-11.2.2/lib/rake/task.rb:243:ineach' /usr/lib/ruby/gems/2.1.0/gems/rake-11.2.2/lib/rake/task.rb:243:in
' /usr/lib/ruby/gems/2.1.0/gems/'을 실행하십시오. 에어 브레이크-5.5.0/LIB/에어 브레이크/레이크/task_ext.rb : 19 :mon_synchronize' /usr/lib/ruby/gems/2.1.0/gems/rake-11.2.2/lib/rake/task.rb:180:in
/usr/lib/ruby/2.1.0/monitor.rb:211:in 'invoke_with_call_chain에execute' /usr/lib/ruby/gems/2.1.0/gems/rake-11.2.2/lib/rake/task.rb:187:in
블록