MQTT stop working after receiving large bytes of data in FreeRTOS

Stack overflows are one of the most common causes of runtime crashes and other issues in FreeRTOS. It would have spared you and all of us a lot of time and brain power if the stack overflow had been pinpointed earlier. The runtime check @rtel mentioned would probably have helped locating the problem faster.