FreeRTOS queue overflow, configASSERT in MQTT implementation. LwIP-MQTT-STM32H7
Hello,
I hope everyone are doing well!
I have implemented MQTT protocol in an STM32H7 microcontroller that is attached on a display. For that reason I have use the subscribe method in order to receive payloads from 6 different topics, which two of them has large bytes because they have JSON form. During its normal operation, it appears the exact data on the screen and it is working correctly, it stops working (ping returns "can't reach destination" and also MQTT stops working) by giving me an
configASSERT( pxQueue->uxItemSize == 0);
in the function xQueueSemaphoreTake as the figure showing below:

I am not able to understand what is the problem, before that due to the reason that the two payloads was so large the xQueue was being overwritten and this configASSERT was appearing again, but the problem was that
uxLength and uxMessagesWaiting
had a big number that was not normal. This problem I was able to solve it by increasing TCPIP_STACK_SIZE in lwipopts.h. Although this problem now I can't figured it out how to solve and I ensure to you that I have tried a lot of things that didn't work. I really need help and I would appreciate if you give me a hint.
Let me declare some things below that might needed for you:
This is my lwipopts.h file :

and this is my MPU_Config function:

