ZDM causes irregular program operation

Hi

I added ZDM feature to my ESP32 firmware code. It works, but I have a problem.
When zdm is added to the code, my code work properly for about two hours after programming.
After that, however, the operating speed slows significantly, and after about 15 minutes, the esp32 automatically reboots.
If zdm is not added to the code, my code works well at a constant operation speed without rebooting.
I observed it several times on the serial monitors. It’s almost regular.
So I think it’s a problem related to the using of ZDM.
The operating speed is important factor in my application and the firmware should work for a long period of time without rebooting as long as there is no external factor.
How can I solve this problem? I’m using ESP32 Devkitc and I installed Fota enabled VM on the esp32. I use flash memory with the following command in my code.
ff = flash.FlashFileStream(0x00350000, 512)

I will provide everything you need to solve this problem.

Thanks in advance.

This seems like a runtime error and it is very hard to pinpoint exactly the root cause.
Maybe after some time your ran out of RAM for example.
I suggest you make sure your applications runs exactly as expected without the Zerynth device manager, then test the ZDM in a minimal example and see then test it as a whole.

Hi @karimhamdy1
Thanks for your reply.
I already tested my code with ZDM and without ZDM several times. As I explained in the above, when I didn’t include ZDM feature to the firmware, it’s working well at a constant operating speed without rebooting for two days. However, I add ZDM to the code, it’s working at a constant speed for about an hour and 50 minutes. After that, the operating speed slows down, esp32 reboots after 15 minutes.
This is regular and repeated.
I checked this several times on zerynth serial monitor and grafana(The esp32 sends data the server and the data is displayed on grafana running the server)

Maybe after some time your ran out of RAM for example.

I think so. How can I solve it?