Esp32 sim800l mqtt

When I remove the mqtt.publish code ,There is no problem ,but with that code one time in about 40-45 minutes , there is wrong reading in I2C. Unfortunately ,I couldnt share all code because the code is too long and as I said when I add publish code ,it is starting wrong readings ,in the code I published one time in 30 seconds,when I decrease the time,more wrong readings come.