Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb不能写慢查询log日志
【TiDB Usage Environment】Production Environment
【TiDB Version】v3.1.2
【Encountered Problem: TiDB cannot write slow query log, indicating that memory cannot be allocated, but checking the system memory shows that it is sufficient】
【Attachments: Screenshot/Log/Monitoring】
Try to upgrade to a higher version as much as possible. Most people no longer use the lower versions. Many issues cannot be reproduced without the same version, which will affect your efficiency in solving problems. Additionally, many issues in the lower versions have already been resolved in the higher versions. So, the answer to many of your queries might simply be: it’s a bug, and upgrading to a higher version will solve the problem.
The main reason is to ensure stability, so we generally don’t upgrade. 
Please send the parameter configuration document. It is obviously a memory allocation issue. Unable to allocate memory.
In a production environment with 14GB of memory… it seems that TiDB’s minimum memory requirement is more than that, right?
Check the file permissions.