Re: Application silently shuts down by itself after running for some hours

2017-03-08 Thread Herwig Hochleitner
2017-03-08 9:00 GMT+01:00 JokkeB : > Now tracking down if I'm simply too low on memory or if the app has a > memory leak, but that's a different topic. > Your app may well be fine. The OOM killer removes processes in descending order of memory usage, when RAM runs out. As

Re: Application silently shuts down by itself after running for some hours

2017-03-08 Thread JokkeB
Thanks to all the replies. Yes, the reason indeed was linux killing the process. cat /var/log/kern.log verified this. There was no exception logged because there was no exception/error. Now tracking down if I'm simply too low on memory or if the app has a memory leak, but that's a different

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Mark Nutter
I see this thread is going on for a while, and I'll say up front that I don't have any helpful insights. I did see an interesting talk at Abstractions, though, about how to use dtrace to get to the bottom of weird problems like this. The video for that event doesn't seem to be online anywhere, but

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread lawrence . krubner
To catch OutOfMemoryError s: catch(OutOfMemoryError e) On Tuesday, March 7, 2017 at 5:18:44 PM UTC-5, JokkeB wrote: > > I'm under the impression that setDefaultExceptionHandler still catches OOM > errors. Some googling suggests this too. If not, how should I try to catch > it? > > I am

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Johannes Ahvenniemi
I'm under the impression that setDefaultExceptionHandler still catches OOM errors. Some googling suggests this too. If not, how should I try to catch it? I am running the app on a virtual server with 512mb ram. free -m is showing 30mb free. Lack of memory can be the issue. What would be the

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Alex Miller
If you are getting an OOME there are some JVM flags that can help dump an error file or heap dump, or run arbitrary commands when an error occurs: -XX:ErrorFile=./hs_err_pid.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./java_pid.hprof -XX:OnError=";" -XX:OnOutOfMemoryError=";" That

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread piastkrakow
I asked the same question a year ago. The problem was that I was getting an OutOfMemoryError. This is an Error but it is not an Exception. If you catch all Exceptions, you will still not catch the OutOfMemoryError. You have to catch that too. On Tuesday, March 7, 2017 at 2:54:26 PM UTC-5,

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Kevin Corcoran
On Mon, Mar 6, 2017 at 11:56 PM, JokkeB wrote: > After adding this, I still can't see an exception before the app dies. > I've encountered this before when the Linux "OOM killer" kicks in, which is especially likely if you are running your application on a

Re: Application silently shuts down by itself after running for some hours

2017-03-06 Thread JokkeB
After adding this, I still can't see an exception before the app dies. maanantai 6. maaliskuuta 2017 12.04.16 UTC+2 JokkeB kirjoitti: > > Thanks for the reply. > > I haven't tried catching any or all errors. Is it a false assumption that > an error should be logged if it comes from the main

Re: Application silently shuts down by itself after running for some hours

2017-03-06 Thread JokkeB
Thanks for the reply. I haven't tried catching any or all errors. Is it a false assumption that an error should be logged if it comes from the main thread? Can an exception in another thread kill the app? Anyways, I now added this piece of code in main, like instructed in

Re: Application silently shuts down by itself after running for some hours

2017-03-04 Thread Scott Bauer
Out of curiosity, have you tried catching any and all errors as opposed to expecting to see an error message logged upon the system dying? While searching for possible causes, I did come across this similar post from a

Application silently shuts down by itself after running for some hours

2017-03-03 Thread JokkeB
I have an application which I run with "lein run". The main looks something like this (defn -main [] (log/info "start") (log/info "channel returned" (async/http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure"