I have wso2emm version 1.1.0 installed on a Linux CentOS 6.5 with a separate MySQL DB Server. Everything seems to work fine: I can create users, send invites, have android agent installed and users' devices enrolled. I can Upload Android App (I'm not testing iOS at the moment) and have them deployed on devices. The problem arise when I connect to "Mobile Management Console": WHen I click on the Tab "App Management" and then, on a particular App, this sends the following query to mysql
-- Connection Id: 47 -- User: wso2carbon -- Host: localhost:34879 -- DB: WSO2_EMM_DB -- Command: Query -- Time: 208 -- State: Sending data
select out_table.id, out_table.user_id, out_table.device_id, out_table.received_data, devices.platform_id from notifications as out_table , devices where out_table.`feature_code`= '502A' and out_table.`status`='R' and out_table.`tenant_id`=1 and out_table.`id` in (select MAX(inner_table.`id`) from notifications as inner_table where inner_table.`feature_code`= '502A' and inner_table.`status`='R' and out_table.device_id =inner_table.device_id) and devices.id=out_table.device_id and devices.platform_id=1 and `received_data` not like '%renelco.hellorenelco%'
Then, no result are received by wso2emm (list nof roles or users) and the app hangs.
What's wrong with this ?
I tried several things like
- Killing mysql query/session
- Stopping/restarting MySQL.
- Stopping/Restarting wso2emm server
- Restarting the whole Linux server
But nothing has fixed the problem. It seems that something on the db server is blocking the query but I can't find what. Any help would be appreciated ... Best Regards
This issue appears to be fixed with EMM 2.0, available here.
This isn't a permanent solution, but it's a workaround that'll do the job until someone comes up with something better.
Back up the database files in EMM_HOME/repository/database on a regular basis; and then when the issue occurs, shut down the service and overwrite the WSO2EMM_DB.h2.db file with the latest backup made.
Something is causing the WSO2EMM_DB.h2.db file to get overinflated somehow. This happened to me tonight, and the bad file had a size of 49,016 KB, while the good file I backed up when the last changes were made has a size of 4,872 KB. That's a pretty significant difference.
EDIT: I've been running the server without making any changes to and keeping an eye on the WSO2EMM_DB.h2.db file. It seems to gain about 2 megabytes in size every hour. At first I thought it didn't gain size at a slow steady rate, rather all at once every hour, but after further experimentation I found it does in fact grow steadily.
I remember there is an error in mysql script, you can verify by running h2 database. If it works, then it is an error caused by mysql script.