Failed Query OPM Continues to Surge

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

Original topic: Failed Query OPM 猛增不减

| username: TiDBer_vFs1A6CZ

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.5.1
[Reproduction Path] None
[Encountered Problem: Problem Phenomenon and Impact]
TiDB monitoring interface shows that Failed Query OPM is increasing sharply and not decreasing.
image

QPS Monitoring

[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page

How to locate the query statement corresponding to the Failed Query
[Attachment: Screenshot/Log/Monitoring]

| username: Jellybean | Original post link

Check the logs of tidb-server, as well as the slow queries and SQL analysis in the Dashboard, to see the specific abnormal information.

| username: Fly-bird | Original post link

Filter slow queries.

| username: 像风一样的男子 | Original post link

The TiDB service seems to be abnormal. Check the logs.

| username: tidb菜鸟一只 | Original post link

Use tiup cluster display <cluster-name> to check if all components are functioning properly.

| username: 路在何chu | Original post link

Are there any errors in the TiDB logs?

| username: TiDBer_vFs1A6CZ | Original post link

The cluster is normal, but I suspect that a certain query statement has a problem. I want to know how to locate the abnormal query statement.

| username: tidb菜鸟一只 | Original post link

There are no errors reported in the TiDB logs? These are all TiDB query anomalies.

| username: h5n1 | Original post link

[ERROR 1364 (HY000): Field ‘xxx’ doesn’t have a default value

Did you change the table structure?

| username: TiDBer_vFs1A6CZ | Original post link

Thank you. By identifying the 1364 error, I found the table corresponding to the abnormal query and located the issue where the upstream data source had modified the table structure fields.

| username: h5n1 | Original post link

The admin show ddl command can display DDL statements.

| username: zhanggame1 | Original post link

The error should have been recorded at the application layer, right?

| username: 随缘天空 | Original post link

Query failed. You can copy the corresponding SQL statement and execute it in the client to see if there are any errors. This situation is mostly caused by changes in the table structure.