WSo2 EMM - App Management Database Bug

2019-02-27 12:07发布

Running WSo2 EMM 1.1.0, everything has been working just fine except for one big issue.

From the moment I first click on an app in the App Management tab, the WSO2EMM_DB.h2.db file starts to steadily grow as long as the server is running, even with absolutely no changes. Eventually, it gets so big that clicking an app on that tab takes a ridiculously long time to load the list of devices using the app. We're talking 5+ minutes, it becomes completely unusable. I have checked the error logs and found no errors at all, every time.

Restarting the server does nothing to correct the issue. Even if I click an app on the App Management tab once, and never again, the database file will continue to grow. Even restarting the server and not logging into the EMM page, it will continue to grow.

The only thing I've found so far that can possibly help is keeping backup copies of the database file and overwriting the current file when it gets too big. Obviously that's not a solution, as I'd need to create a new backup file every time there's a change on the server, and eventually the database file would grow too big from that too.

It's not an issue with the H2 database either. Not only have I tried starting over fresh several times and have had the same behavior, but here is the only info I could find regarding this issue, and they were having the issue regardless of whether or not it was on H2 or MySQL.

I've been trying to find a solution for this for over a month with no success. Any help would be appreciated!

EDIT: It looks like this might be the subject of EMM-826. Unfortunately there seems to be no response to that bug report so far.

EDIT 2: EMM-826 was closed with a message saying the following:

This issue is fixed in the EMM 1.1.0 GA latest pack. Please get all the patches for the product/build the product from the latest source [ https://github.com/wso2/product-emm ] and try again.

Unfortunately, that did not work for me. I'm not sure what exactly I'm doing wrong, so I'll list the what I did to try to fix it:

  1. Downloaded the EMM 1.1.0 zip from http://wso2.com/products/enterprise-mobility-manager/.

  2. Downloaded the zip from https://github.com/wso2/product-emm and pasted the files from that into my EMM_HOME directory.

  3. When that didn't work, I searched for patches and found I was only using patches 1-6. In the documentation I found I could download patches 7-12 here. Patches 9 and 10 didn't work right for some reason; causing me not to be able to reach the EMM dashboard or publisher. I could only access the Carbon manager. I was able to make patches 7, 8, 11, and 12 work though - with no change in behavior.

Here are the steps I take to reproduce the issue:

  1. After setting a fresh copy of the EMM up, I log in to the EMM dashboard as Admin, set up a user account, and upload an app through the Publisher.

  2. Register a device to the user account I set up. In this case, an Android device running Android 4.2.2.

  3. From the dashboard, I go to App Management and click the app I uploaded. The list of devices loads, but from that point on, the database file starts growing and eventually, after several hours, becomes so large it the device list will never load.

Please help!

2条回答
虎瘦雄心在
2楼-- · 2019-02-27 12:18

Issue appears to be resolved in EMM 2.0, which can be found here.

查看更多
迷人小祖宗
3楼-- · 2019-02-27 12:43

Found this happening also, from a quick look it's the WSO2EMM_DB.notifications table. Seems to keep a history of all notifications over time, and the info for app installs is taken from non-optimized queries, which degrade as the table grows. You 'could' delete all rows from the table, and it will re-populate as devices 'check back' and report their info.

But you'd probably want to write a query to just keep the latest notification of each type of each user (I'll leave that to someone else...) and as was mentioned, it is apparently fixed in the latest version.

查看更多
登录 后发表回答