I have the very same -or at least a VERY similar - problem, with stock firmware.
I'm running 17.1.1.A.0.402 (Germany/Telekom) and every once in a while, my internet just doesn't turn itself on, when leaving a WLAN, or when entering a "no internet" zone. It just won't start any data connection while phone/SMS services run fine. I have to manually turn it off and back on. Then it'll work fine, right away!
I already checked, there's no new system updates for me to install (even though Sony website says 17.1.2.A.0.314 is the newest, it's not available for my device. Neither OTA, nor Sony PC companion can find any update).