Hi! This is a problem I've had in several roms, and is compared to the inactivity of wifi. Depending on the rom and kernel that you may have will have the following options or not. As for me it has worked for me was:
1. wifi, advanced settings, use wifi in suspension, always choose.
2. In the system, build.pro mods, select disable sleep mode pm (this option is CreedROM Kosako rom v14, other roms know if they have one).
3. In the application of the kernel (I use semaphore manager), tweaks, fast wifi pm suspend When enabled.
I hope I have helped.