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 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 best 
> way to confirm this if I'm not able to log the error?
>
> Sent from my iPhone
>
> On 7 Mar 2017, at 23.25, piast...@gmail.com <javascript:> wrote:
>
> 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, Kevin Corcoran wrote:
>>
>> On Mon, Mar 6, 2017 at 11:56 PM, JokkeB <jahv...@gmail.com> 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 
>> resource-constrained system (say, a VM with a low RAM allocation) or your 
>> application is competing with other programs for memory.
>>
>> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com <javascript:>
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/zhdcNMC7fQ8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojure+u...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to