[Resolved] rufus-scheduler on nginx/passenger is not doing anything
When i enable rufus-scheduler it doesn't seem to do anything, it also doesn't output any noticeable errors. Fetching mail works fine through regular cron. How can i debug this?
fusion passenger: 5.0.10
require 'rubygems' require 'rake' require 'rufus-scheduler' load File.join(Rails.root, 'Rakefile') ENV['host']='imap.gmail.com' ENV['port']='993' ENV['ssl']='SSL' ENV['username']='<username>' ENV['password']='<password>' ENV['move_on_success']='Success' ENV['move_on_failure']='Failed' scheduler = Rufus::Scheduler.new scheduler.interval '5m' do task = Rake.application['redmine:email:receive_imap'] task.reenable task.invoke end
[ 2015-07-03 14:00:40.2559 3801/7fb96742b740 age/Wat/Main.cpp:1293 ]: Starting PassengerAgent watchdog... [ 2015-07-03 14:00:40.2614 3804/7f18d68c1740 age/Hel/Main.cpp:957 ]: Starting PassengerAgent server... [ 2015-07-03 14:00:40.2616 3804/7f18d68c1740 age/Hel/Main.cpp:234 ]: PassengerAgent server running in multi-application mode. [ 2015-07-03 14:00:40.2630 3804/7f18d68c1740 age/Hel/Main.cpp:707 ]: PassengerAgent server online, PID 3804 [ 2015-07-03 14:00:40.2686 3809/7fa218249740 age/Log/Main.cpp:430 ]: Starting PassengerAgent logger... [ 2015-07-03 14:00:40.2692 3809/7fa218249740 age/Log/Main.cpp:311 ]: PassengerAgent logger online, PID 3809 App 3848 stdout: App 3848 stderr: sh: 1: App 3848 stderr: env: not found App 3848 stderr: App 3865 stdout:
I'm not sure what the env: not found message above means, but it also appears without rufus-scheduler enabled so i suspect it is unrelated.
Thanks for any insight!
RE: rufus-scheduler on nginx/passenger is not doing anything - Added by Olivier Keun over 8 years ago
Resolved: this was apparently caused by passenger's default spawning method. Adding this to the server block in the nginx config fixed it:
I do wonder however if the performance penalty for using direct spawning makes using rufus-scheduler really worthwhile.