Document and solve upgrade path issues
Closed this issue · 3 comments
Nepal MoH is using an older version of medic-gateway, as documented in this project issue. Work out what's needed to get them on to the latest so they can benefit from any improvements we make.
Nepal MoH Project
TL;DR
Frequent WiFi fluctuations provoke the phone to switch to mobile data. It has been observed that when these fluctuations happen Gateway stops working and connecting to API, then the team needs to restart Gateway.
Extended Version
The project is using phones with the following characteristics:
- Android 5, 6 and 8.
- Storage 16 GB, only essentials installed.
- Huawei Y7 Pro 2018 and 2019, Huawei Che2-L11, Huawei LUA-U22, Mi A2 Lite and Nokia 2.3
- Always connected to the power source, ensuring battery at 100%.
- SMS Gateway 1.5 version.
- When SMS Gateway is installed, it is configured in the phone under protected apps so the system doesn't kill it automatically.
- SMS traffic on a very busy day is maximum 200 per day per phone (batch is 10 SMS).
- Connected to WiFi (1 WiFi in the office with load balancer).
The storage is been monitored and the team doesn't think it's a problem.
They often experience fluctuations in the Internet connection, causing the phone to switch from WiFi to mobile data. Due to the localisation of the office, mobile data can be very slow. Apparently when these fluctuations happen, the SMS Gateway stop working and stop connecting with the API and then the team needs to restart the app. It's important to note that this happens with SMS Gateway 1.5.X, but it’s 3 times more frequent on 1.7.X.
There aren't logs available, because when they connect the phone to the computer the Gateway starts working again and they can’t see the past logs.
Additional Information
- The issue doesn’t happen while the phone is connected to a computer.
- It's unknown how long the Gateway tries to connect to WiFi before it fails.
- SMS Gateway introduced a new feature in + 1.6.X, a mechanism to detect when WiFi is unreachable and it will keep trying to switch it on every few minutes.
- It doesn't matter what device is used, version 1.7.X behaves highly inestable and the team needs to switch to 1.5.X.
MOH Ke (CEBs training) and ITECH Zimbabwe (production)
I raised the question to some Africa projects to know if they were experiencing the same issue as Asian projects.
They are using SMS Gateway version 1.5.X because of SMS from being stuck in Pending status and long feedback from sent SMS affecting large training sessions. Their phones are connected to stable WiFi connection and aren't constantly switching to mobile data. As today, these projects aren't reporting issues related with WiFi as Asia projects.
What we are going to try
- We're going to add a configuration option to switch off/on the feature that was added in +1.6.X and that probably made Gateway more inestable as reported by Asia projects.
- Some work was done to prevent SMS from being stuck in Pending status This is because newer versions of Android and newer phones have been including performance mechanisms that prevent some background actions to execute for long time.
- It will be necessary extra actions to ensure the app isn't switch off by the phone's system, some projects are already doing this:
- Enabling
developer mode
and turn onStay awake
feature. - Keep phone connected to the power source.
- Enabling the Gateway as protected apps.
- Currently there is an issue raised that could help on keeping the Gateway running better in background. As today, this issue hasn't been started yet.
Nice to have
The team is using a nice monitoring tool, where they can see each phone status (WiFi, signal, sms traffic, etc) maybe it would be useful to have stats from this tool, so we can detect trends overtime on phone/gateway performance.
@latin-panda Items 1 and 2 being released as part of 3.11.0. The other items are being tracked. Is there anything more to do with this issue or can we close it out now?
@garethbowen I think we can close it :)