help with rails daemon

11 views
Skip to first unread message

Allen Maxwell

unread,
May 31, 2016, 2:50:52 PM5/31/16
to ur...@googlegroups.com
Hi all,

I’ve set up a daemon to keep my mail server running to integrate reading mail in my rails application. Unfortunately, the daemon seems to shut down for unknown reasons… I can log out of the server and log back in and it’ll be running fine - and log in later and it’s just not there. I don’t see anything in the mail log file to indicate that anything went wrong.

Any ideas why this would be happening? It’s a Digital Ocean server and seems to be pretty stable. I hope to go live for production tomorrow and would like to have this up and running reliably! Also, any hints on a best way to monitor the daemon other than manually logging in and checking the status?

thanks in advance.

Max

David Anderson

unread,
May 31, 2016, 2:59:47 PM5/31/16
to ur...@googlegroups.com
Hello Allen

How are you launching the daemon?

By hand, init…?

I would want to see what command you are using also.

Dave Anderson
> --
> http://utruby.org
> http://groups.google.com/group/urug
>
> please prefix the subject with [JOB] when regarding job opportunities
> ---
> You received this message because you are subscribed to the Google Groups "Utah Ruby Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to urug+uns...@googlegroups.com.
> To post to this group, send email to ur...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Charles Wood

unread,
May 31, 2016, 5:56:40 PM5/31/16
to Utah Ruby User Group
Are you using any monitoring software like monit, god, or nagios?

Sean Mikkelsen

unread,
May 31, 2016, 9:24:24 PM5/31/16
to ur...@googlegroups.com

I've had daemons die when the box runs out of memory. Maybe not likely in your case but one more thing to keep an eye on.

Jason Mavandi

unread,
Jun 1, 2016, 12:32:38 PM6/1/16
to ur...@googlegroups.com
I think you already have this part because you said you could log in and out, but make sure that you are not daemonizing you service right when you SSH in. All things started die when you exit unless you use something like screen or nohup.

Clinton De Young

unread,
Jun 1, 2016, 12:34:34 PM6/1/16
to ur...@googlegroups.com, ur...@googlegroups.com
Or Tmux, or iTerm2's latest beta.

Sent from Nylas N1, the extensible, open source mail client.
On Jun 1 2016, at 10:32 am, Jason Mavandi <mvn...@gmail.com> wrote:
I think you already have this part because you said you could log in and out, but make sure that you are not daemonizing you service right when you SSH in. All things started die when you exit unless you use something like screen or nohup.
On Tue, May 31, 2016 at 7:24 PM, Sean Mikkelsen <se...@mikkelsenfam.com> wrote:

I've had daemons die when the box runs out of memory. Maybe not likely in your case but one more thing to keep an eye on.

On May 31, 2016 3:56 PM, "Charles Wood" <ch...@teachmetocode.com> wrote:
Are you using any monitoring software like monit, god, or nagios?

Allen Maxwell

unread,
Jun 1, 2016, 1:47:43 PM6/1/16
to ur...@googlegroups.com
not yet, it’s on the list of things to look into…

thx

Charles Wood

unread,
Jun 1, 2016, 2:44:26 PM6/1/16
to Utah Ruby User Group
If you're on ubuntu are you using upstart to start it up? (or some other init script or rc.d start-on-boot setup?)

Allen Maxwell

unread,
Jun 1, 2016, 9:18:06 PM6/1/16
to ur...@googlegroups.com
yes, David Anderson helped me get an upstart script running… and we got some better logging.  I also bumped the droplet memory size up which I hope helps.

The mail server died again a bit ago and here’s what I got in the log this time:

/home/aamax/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/pop.rb:1005:in `check_response_auth': -ERR [SYS/TEMP] Temporary system problem. Please try again later. (Net::POPAuthenticationError)
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/pop.rb:904:in `auth'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/pop.rb:566:in `do_start'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/2.2.0/net/pop.rb:536:in `start'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/receiver/pop3.rb:36:in `connect'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/application.rb:139:in `block in polling_loop'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/application.rb:137:in `loop'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/application.rb:137:in `polling_loop'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/application.rb:87:in `run'
        from /home/aamax/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/mailman-0.7.3/lib/mailman/application.rb:15:in `run'
        from script/mailman_server.rb:34:in `<main>'



For some reason Gmail is having a problem authenticating after it’s been running for a while (this checks for mail every 10 seconds… maybe that’s too much? but not sure why it would crap out like this)

I’m adding a respawn in there but it seems like putting a band aid on a bullet hole…

Max
Reply all
Reply to author
Forward
0 new messages