The problem of message push on Wechat official account template

problem description

when I was doing Wechat official account push, I encountered a very strange problem. Every time the push was completed, there would be one more record in my template for the message management in Wechat"s public platform.
because the official account is limited to 25 templates per account, soon, my template will reach 25, and the official account can no longer be pushed.

the environmental background of the problems and what methods you have tried

this problem has not appeared before, but only recently

related codes

/ / Please paste the code text below (do not replace the code with pictures)
my push process looks like this:
1. Get the template ID
2. Push message
3. After the push is successful, delete the template message according to the template ID

what result do you expect? What is the error message actually seen?

Mar.29,2022

are you requesting the wrong interface? There is indeed a new template API


long id obtained with short id can be used all the time. Why get, use, delete?
if the upper limit of 25 is easily reached, then you should also put in place a lru elimination mechanism, giving priority to deleting the least recently used ones instead of getting a template each time. There are three requests at a time, regardless of the error rate. Wechat also has a daily frequency limit on many interfaces. If the limit is triggered, it will lead to failure.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bfdd-2c2c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bfdd-2c2c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?