Closed clkao closed 10 years ago
why not use runit ?
lyapi runs with runit. monit allows declaring what to monitor and what to do when failed
This is the first try that including monit. if the total memory usage exceed 1024MB, it will restart lyapi.
It needs more love to specify proper threshold, any one?
@walkingice++ can we use http connection to /collections/bills for checking (error or timeout) instead of memory usage? (memory usage is by bill-details daemon)
yeah, it is feasible by invoking exec "curl http://localhost/collections/bills". But I don't know how to trigger the crash to test. any idea?
can use connection testing instead of curl: http://mmonit.com/monit/documentation/monit.html#connection_testing_using_the_url_notation
for simulating the failure and trigger, perhaps just manually shutdown postgresql? ;)
Good idea! I will do it later
seems nobody complain the commits, close it.
when bill-detail is running, memory usage can crash postgres worker progress, and currently lyapi service doesn't respond gracefully to that (pgrest/pgrest#54)
https://github.com/phlipper/chef-monit