3

I have a Rails app running on Apache/Passenger. It has a rufus-scheduler cron job that runs in the background and sends out notifications via email.

When I am running the app in development on the WEBrick server, the emails are sent like they are supposed to be sent.

When I start up the app in production on Apache/Passenger, the emails don't get sent. In the production logs it doesn't show any logs for rufus-scheduler.

I'm stuck in this problem. Your help will be appreciated, thank you in advance.

franzlorenzon
  • 5,845
  • 6
  • 36
  • 58
Dnyanarth lonkar
  • 869
  • 7
  • 12

1 Answers1

4

The easiest solution is to set PassengerSpawnMethod to direct. The Phusion Passenger documentation explains why this solves it: http://www.modrails.com/documentation/Users%20guide%20Apache.html#spawning_methods_explained In particular, take a look at section "15.4. Smart spawning gotcha #2: the need to revive threads".

Hongli
  • 18,682
  • 15
  • 79
  • 107