Photon blinking cyan with intermediate yellow/red blinks

Hello everyone,
My photon is acting weird. It is connecting to the cloud when I flash my code. I can see that its breathing cyan happily. After some time it enters into blinking cyan and gives intermediate yellow/red flashes. I am not sure what’s causing this. What could this combination of color codes mean?

[UPDATE]
Here is my log at the point which fails
<…WORKING HAPPILY…>
0001027829 [comm.sparkprotocol] WARN: ping ACK not received
0001027829 [system] WARN: Communication loop error, closing cloud socket
0001027829 [system] INFO: Cloud: connecting
0001027857 [system] INFO: Resolved host device.spark.io to 52.91.48.237
0001032857 [system] ERROR: connection failed to 52.91.48.237:5683, code=-2
0001032857 [system] WARN: Cloud socket connection failed: -2
0001037858 [system] WARN: Internet Test Failed!
0001037858 [system] WARN: Resetting WLAN due to 2 failed connect attempts
0001037858 [system] WARN: Handling cloud error: 2
0001037858 [system] WARN: Resetting WLAN due to SPARK_WLAN_RESET
0001037862 [system] INFO: Network Connect: !SPARK_WLAN_STARTED
0001037862 [system] INFO: ready(): 0; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0
0001037863 [hal.wlan] INFO: Using internal antenna
0001037866 [system] INFO: ARM_WLAN_WD 1
0001038627 [system] INFO: ARM_WLAN_WD 2
0001038627 [hal.wlan] INFO: Bringing WiFi interface up with DHCP
0001038648 [system] INFO: CLR_WLAN_WD 1, DHCP success

and the error messages repeat again.
Thanks
Dheeraj