Will insufficient disk space cause slow queries of large statements to not be logged?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 磁盘空间不足时会导致不记录大语句的慢查询么?

| username: Kongdom

[TiDB Usage Environment] Production Environment
[TiDB Version] v5.1.0
[Reproduction Path] None
[Encountered Problem]
Only some slow queries are recorded in the slow query log. Manually executing a query that takes more than 10 seconds is not recorded in the slow query log, but there are indeed slow queries recorded today. Could insufficient disk space cause this situation?

| username: xfworld | Original post link

You definitely need to ensure enough space, otherwise, the logs can’t be written… In severe cases, the service will crash… :rofl:

| username: xingzhenxiang | Original post link

Insufficient disk space can cause various inexplicable problems. It feels like it’s essential to ensure that the basics are adequately provided.

| username: Kongdom | Original post link

It’s not that there is no space at all. The current situation is that some statements are recorded, while others are not. The time for all of them exceeds the threshold.

| username: 裤衩儿飞上天 | Original post link

Could it be that they are not on the same TiDB server?

| username: Kongdom | Original post link

:joy: Just checked, all the slow queries are from one node, and the slow queries from other nodes are not recorded~

| username: 裤衩儿飞上天 | Original post link

Is the configuration of TiDB server slow logs different?
show config where name like ‘%slow%’

| username: Kongdom | Original post link

The case is solved; it’s a bug in this version. When the log level is set to error, slow queries are not recorded.

| username: 裤衩儿飞上天 | Original post link

Take a small notebook and jot it down~

| username: Kongdom | Original post link

Here

| username: Running | Original post link

I have encountered disk insufficiency twice. Generally, it becomes extremely slow even before any log records indicate a problem.

| username: Kongdom | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.