I'm using Endomondo for tracking my sport activity and using that on RedMi 3s phone was a bit pain, because the application crashed every 30m or so after the phone was locked.
It turned out the culprit was the setting "Clear cache when device is locked", which was set to 30m. To find it open "Settings", "Battery", "Power". Then tap on the little cog in the top right corner. Then set the "Clear cache when device is locked" option to "Never".
By the way this solution solved a similar problem with Smart AudioBook Player. It seems not so great idea to clear cache of running applications ;-)
Apart from those settings you might want to prevent MIUI to restrict background activities for some applications - like Endomondo or Smart AudioBook Player. Otherwise MIUI when using Power Saving Mode might kill those apps.