Get the App
SLTechnology News&Howtos  ›  Database  › 

How to solve the Warning: a long semaphore wai problem of InnoDB

Shulou Source: shulou.com Published: 2022-05-31 13:57:40 11月14日 Update

This article focuses on "how to solve the Warning: a long semaphore wai problem of InnoDB". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the Warning: a long semaphore wai problem of InnoDB.

InnoDB: Warning: a long semaphore wait:-- Thread 47843012708096 has waited at btr/btr0cur.c line 467 for 334.00 seconds the semaphore:

The original linux kernel semaphore default setting is too small, pressure testing, resulting in a lot of waiting

Default

# cat / proc/sys/kernel/sem

250 32000 32 128

Description:

The first column represents the maximum number of semaphores in each signal set.

The second column represents the total number of system-wide maximum semaphores.

The third column represents the maximum number of system operations when each signal occurs.

The fourth column represents the system-wide maximum total number of signal sets.

Adjust the third column a little larger to refer to the data on the network

Echo "kernel.sem=250 32000 100128" > > / etc/sysctl.conf

Then sysctl-p

Restart mysql

At this point, I believe you have a deeper understanding of "how to solve the Warning: a long semaphore wai problem of InnoDB". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Signal maximum problem system semaphore content total number range learning practical deeper interest kernel practical simple operation data method time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei Microsoft Redmi OPPO Reno