arches / whacamole Goto Github PK
View Code? Open in Web Editor NEWrestart heroku dynos that run out of RAM instead of swapping to disk
restart heroku dynos that run out of RAM instead of swapping to disk
if tailing the logs and your config is watching multiple different heroku apps it's hard to know one web.1, web.2 from a different's app's web.1, web.2. Can we also print out the application name?
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
Hi! I read abaout whacamole and it sounds fantastic. It colud solve my problem.
Iยดm trying to add it to my project but i cant find the way to do it.. I have a java spring application running in heroku, and i dont know how to add "the gem" that yo say in the Readme
when i run the command "gem whacamole" my cmd console says it doeasent recognize the command.
Can you help me to install it?
I was looking for an add-on that did this, and stumbled upon this gem in the process. Ever consider making this an official Heroku add-on? ๐
I noticed my dynos weren't restarting as expected. This seems related to what appears to be a several hour window of time where no DynoSize events are logged. Is that a common problem? Or was heroku just having a bad day today?
When starting up Whacamole I encounter a URI bad argument error.
I have implemented the gem according to the readme file and cannot work out why, could this be because it is not compatible with rails 5?
/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/uri/common.rb:716:in `URI': bad argument (expected URI object or URI string) (ArgumentError)
Looking through the source, it appears that RESTART_THRESHOLD is hard coded at 1000 (MB). This is great for people running 2x dynos, but not so much for the 1x'ers.
In tailing the logs I only see memory output for web workers, I don't see any for heroku background workers: worker.1, worker.2 etc. Is that not supported?
Running an additional dyno seems expensive
Unless you are talking about running it in another Heroku app
(In that case please write that to readme)
I have been running Puma with the puma-worker-killer gem, and it has been working well for me for some time. This gem seems to solve the problem as that gem. Can you provide some documentation about when one would want to use this gem as opposed to puma_worker_killer in the case of puma or unicorn_worker_kiler in the case of unicorn?
Much appreciated.
As whacamole support monitoring multiple heroku application, I believe it will be useful to see the application name in the output by default, actually we have to define a custom event_handler
for this.
If you agree with the principle, I can write a PR for it.
Preboot starts new dynos before the old ones are killed off and then switches over after 3 minutes. As the README explains, this causes problems for whacamole.
If whacamole added a restart time limit for each dyno, so that it doesn't check or restart a dyno for a certain amount of time (perhaps 3 minutes...or could be configured higher), it seems like whacamole could start working with preboot.
It should be nice to have different thresholds per dyno type. It will be useful in my case.
Heroku says in their docs that swap memory can accumulate before you even hit R14's. Since swap severely degrades performance, I think it would be more prudent of whacamole to monitor swap rather than memory usage (or a combination of the two).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.