-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
OutOfMemory issues #1961
Comments
I would like to add that I was seeing the same issue before upgrade (running 1.5.0) |
Hi Petr, can you provide a heap dump by executing the following command: jmap -dump:format=b,file=heap.bin pid Where "pid" is the process ID of the Java process? I don't know how long it On Sun, Jan 11, 2015 at 5:15 AM, Petr Klus notifications@github.com wrote:
|
One last thing, if you're worried the heap dump may contain sensitive On Sun, Jan 11, 2015 at 8:22 AM, dan cunningham dan@digitaldan.com wrote:
|
Hi, |
Sorry for the delay! OS: Ubuntu 14.04 LTS On Mon, Jan 12, 2015 at 11:53 PM, Dan notifications@github.com wrote:
|
Yes, I'm experiencing this too with OH 1.6.1. I tried to reinstall and reconfigure OH and java (tried both 1.7 and 1.8 version) many times on my Banana PI (tried Bananian, Raspbian and Lubuntu) and I was always getting out of Heap Space after few hours. Last weekend I discovered that in my case this is strictly dependent on using Habdroid. Since I stopped to use habdroid on my (3 different) devices it looks like OH remains very stable. It looks like that it doesn't matter on which hardware Habdroid is running. Once it is connected to OH it makes that openhab starts to generate some errors and at the very end we get out of Heap Space. Also I see that Habdroid version available in Google Play is pretty old. Now the only OH control I use is direct connection via http. |
is it really HABDroid or does this happen when using GreenT or iOS as well? If yes, than it could be related to the Atmosphere issue #765 which also came along with an OOM.
looks good, unfortunately not. How much RAM does your System provide? |
Hi. Here are some details regarding my configuration: root@galactica ~ # inxi -Fx root@galactica ~ # java -version addons installed: I will try to provide some logs soon. |
OK here is some more info. Openhab.log attached. I started Habdroids on my 3 devices and the first ERR message is on: |
@zacofany, was this your whole log file? Did your system startup at 2015-01-14 20:23:59.795 and then throw the OOM error an hour later at 2015-01-14 21:31:49.625 ? Thats a very aggressive memory issue. Can you try getting a heap dump as mentioned in a previous comment? |
@digitaldan Yes, unfortunately that's the whole log file. I will try to provide you new log and heap dump as soon as possible. However this would be the first time for me to do heap dump. At what point should I launch command |
@digitaldan Happened again! here are my logs + heap dump: http://cnktmp.s3.amazonaws.com/petr/20150116_logs_with_heap.zip The trick was indeed to let HABdroid open on a few of my devices and that seems to speed up the manifestation of the problem. |
Here is new log together with heap dump. |
Thanks all, I have enough to go on, there is definitely a leak in the broadcaster class, I'm going back through the binding to see what I can do. If I need more logging I will let you know. |
Thanks for the info. If you need anything more please let us know. I can even provide you remote access to my system if it is necessary. |
Which binding is the leak in? Just curious.. On Mon, Jan 19, 2015 at 3:22 PM, Dan notifications@github.com wrote:
|
This would be the io.rest addon On Mon, Jan 19, 2015 at 6:46 AM, Petr Klus notifications@github.com wrote:
|
@digitaldan Is it somehow specific to a mode of communication? (WebSocket, etc.) The reason I am asking is that I am having almost constantly open the standard web interface (not GreenT) on multiple machines.. and it seems to be just fine! Keep us updated please on the progress, would like to have my tablets running again! Thank you very much for looking into this.. |
What version of the android client is everyone on? Could you all please post a version number? |
HABDroid version: 1.5.1.1 (from Play store) On Mon, Jan 19, 2015 at 6:15 PM, Dan notifications@github.com wrote:
|
@digitaldan I used cloudbees repository to install openhab. I need to download OH package to run start_debug.sh. Or is there any other solution for running openhab service in debug mode? |
@digitaldan on it, just started with DEBUG. I think the other factor in my case are sensors that are pushing approx. 1 update / second via REST interface. Do you need it to freeze again or is a snapshot after couple of hours fine? |
you'll find the start_debug.sh script within the distribution-runtime archive. Best, Thomas E.-E. |
Hi. Here it is. Do you need heap dump too? 2015_01_20.request.log | uploaded via ZenHub |
@digitaldan I meant that the other devices are being pulled by OH, using the HTTP binding mainly, with some subsequent conversion in javascript. Would it be helpful to send you a copy of all my items, configurations and transports? |
@digitaldan Is there any more information I could provide? Would it be helpful to get a heap dump of OH running for a few days without the android clients? Is there anything further I could help with? |
Thanks, but I have enough to go on. I have setup a simple demo environment On Thu, Jan 29, 2015 at 1:38 AM, Petr Klus notifications@github.com wrote:
|
Thanks for the update! Let me know if you find anything that could help.. On Thu, Jan 29, 2015 at 3:31 PM, Dan notifications@github.com wrote:
|
@digitaldan Hello! Just checking in again.. without Android clients running, my system is still fine after more than a week. I occasionally launch my phone app to switch a light on/off but I do not keep it open. Unfortunately, one of my use cases is having an android tablet mounted as a control for headless Volumio music player.. which is not possible at the moment. Is there any other way I could help out with? |
I have been on the road all week and have not found time to focus on it. Sent from my mobile. On Feb 5, 2015, at 3:31 AM, Petr Klus notifications@github.com wrote: @digitaldan https://github.com/digitaldan Hello! Just checking in again.. Unfortunately, one of my use cases is having an android tablet mounted as a — |
Thanks @digitaldan appreciate your help! |
I see whats happening here, there was a change made to the android client, openhab/openhab-android@44de4f4 . The comment says "Changed polling cycle to alternate long polling/regular requests. Improves working with current buggy Atmosphere in openHAB" . This is effectively causing a new atmosphere session to be created every other request. Every session starts to build up a cache of changed objects which only gets cleaned up after our default timeout (i think), on many systems I don't think this is fast enough and it runs out of memory. Let me open a ticket up with @belovictor and see if we can work something out. |
that makes sense! However, just a philosophical point here - is this that Also, having no idea how Atmosphere works but is there any way to define Thank you VERY much for looking into this! On Sun, Feb 8, 2015 at 5:41 PM, Dan notifications@github.com wrote:
|
Both are good points, to the first one, if you are using username/password On Sun, Feb 8, 2015 at 8:52 AM, Petr Klus notifications@github.com wrote:
|
Hi! As @petrklus mentioned, he has no problems on updating items from his sensors, which is a POST request. But that means many update events on the event bus, which are getting buffered in the UUIDBroadcasterCache for every connection. That problem will increase, if a sitemap contains a lot of those items because HABdroid will subscribe with long-polling to all changes of this sitemap page. If HABdroid won't use the UUID correctly as a workaround for #765, the Broadcaster will explode. :-) Does that make sense, @digitaldan ? @digitaldan Indeed, we have a very complicated setup on top of atmosphere! With many try/catches and logging stuff on every request. I hope, my PR will remove a bit of this ovehead. |
@sja your timing is once again great, I am literally sitting here in front of a few terminals watching threads grow out of control and beating my head against the table ;-) Since I have my chatty test system up, I will go ahead and try this out! |
Still testing this, there still seems to be an ever growing amount of threads being produced, I'm on the road for a few days but I will continue to play with this. thanks again @sja ! |
@digitaldan Just to be sure: You've seen my commit to limit the thread pool? This is not part of the PR for Atmosphere 2.2. |
Yes, I combined the two for testing. Sent from my mobile. On Feb 23, 2015, at 3:29 AM, Sebastian Janzen notifications@github.com @digitaldan https://github.com/digitaldan Just to be sure: You've seen my — |
So I think I have found the issue(s), we have a class that delays the delivery of messages to long polling clients by a few hundred milliseconds in order to group changes into a single message. This was creating a new thread pool every time it was called, under light traffic this was not much of an issue, but on a chatty system it would hit some thread contention/locking point and the thread creation would grow out of control very quickly. The second fix is in the Android client, i'll ping @belovictor and see if he he can get that merged. The third fix was to manage the Atmosphere cache to specifically hold only a single PageBean for sitemaps requests. @sja I left out your commit to limit the thread pool on this PR, i was trying to keep my changes related to solving the specific issue listed above. I think it would be great for you to do a PR on that separately as it can only help our situation. |
Awesome, Dan! That sounds very reasonable. Von meinem Telefon gesendet
|
Is this still an issue with the latest build or was this resolved with #2213? |
... any updates? |
No updates from my side. Is there still an issue with this? |
I have not heard any feedback one way or another. |
Hi, I will check if this issue still exist in my case and confirm till the end of the week. Cheers. |
Hi. I've checked it with the current build in my environment and it seems that it works flawlessly right now. Thanks! |
it seems that #2213 solved this issue … |
Hello,
I am experiencing occasional lockups, which are caused by system running out of Heap space. The symptoms are that OH starts using 100% of CPU (single thread), then event processing slows down until it does not continue anymore.
Please see my logs - the "fun" starts in the openhab.log around 3am
logs.zip | uploaded via ZenHub
Explanation for the logs:
The text was updated successfully, but these errors were encountered: