arches / whacamole

restart heroku dynos that run out of RAM instead of swapping to disk
115 stars 12 forks source link

Whacamole triggers restart only first time #15

Closed kaig78 closed 8 years ago

kaig78 commented 8 years ago

Thanks for this great tool. Got it installed and running, but it seems dyno is only restarted first time the limit of 500 MB is reached. What is wrong?

16:55:02 whacamole.1 | started with pid 69360
16:55:05 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a0960c0 @process="web.1", @size=238.24, @units="MB">
16:55:05 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a08f6f8 @process="web.1", @size=238.24, @units="MB">
16:55:21 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a08d178 @process="web.1", @size=238.24, @units="MB">
16:55:43 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c593aa8c0 @process="web.1", @size=550.04, @units="MB">
16:55:45 whacamole.1 | #<Whacamole::Events::DynoRestart:0x007f9c59399ca0 @process="web.1">
16:56:11 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c593415f0 @process="web.1", @size=380.06, @units="MB">
16:56:33 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c58960838 @process="web.1", @size=552.14, @units="MB">
16:56:55 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c589128e0 @process="web.1", @size=573.59, @units="MB">
16:57:17 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c58909010 @process="web.1", @size=573.59, @units="MB">
16:57:39 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c59339a58 @process="web.1", @size=573.59, @units="MB">
16:58:01 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c59330db8 @process="web.1", @size=573.59, @units="MB">
16:58:23 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a1d5bc0 @process="web.1", @size=584.27, @units="MB">
16:58:46 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a1b6b08 @process="web.1", @size=584.27, @units="MB">
16:59:08 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c5a194cd8 @process="web.1", @size=595.0, @units="MB">
16:59:29 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c593da4f8 @process="web.1", @size=609.85, @units="MB">
16:59:51 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c589bb1c0 @process="web.1", @size=609.75, @units="MB">
17:00:14 whacamole.1 | #<Whacamole::Events::DynoSize:0x007f9c592ebc90 @process="web.1", @size=619.66, @units="MB">
My config file:
Whacamole.configure("app-name") do |config|
  config.api_token = 'token' 
   config.restart_threshold = 300 # in megabytes. default is 1000 (good for 2X dynos)
end

Thanks for your hel

arches commented 8 years ago

you'll want to lower config.restart_window, currently the default is one restart every 30 mins. Just updated the readme to show that option, thanks for your question.