Today, the Forum opened this session function, and it was a great honor to step into it. The number of connections went straight beyond 2000. All right, let's talk about it directly: showprocesslist. This SQL statement is displayed on the full screen. In a hurry, pt-kill immediately.
Today, the Forum opened this session function, and it was a great honor to step into it. The number of connections went straight beyond 2000. All right, let's talk about it directly: showprocesslist. This SQL statement is displayed on the full screen. In a hurry, pt-kill immediately.
Today, the Forum opened this session function, and it was a great honor to step into it. The number of connections went straight beyond 2000.
Okay, let's just say:
Show processlist: the SQL statement is displayed on the full screen. In a hurry, pt-kill immediately to let the Forum survive. By the way, I would like to extend my greetings to discuz development. Have you actually tested it and published it directly?
Table Structure:
Mysql> desc pre_common_session; + -------------- + bytes + ------ + ----- + --------- + ------- + | Field | Type | Null | Key | Default | Extra | + ---------------- + ------------------ + ------ + ----- + --------- + ------- + | sid | char (6) | NO | PRI | ip1 | tinyint (3) unsigned | NO | 0 | ip2 | tinyint (3) unsigned | NO | 0 | ip3 | tinyint (3) unsigned | NO | 0 | ip4 | tinyint (3) unsigned | NO | 0 | uid | int (11) unsigned | NO | MUL | 0 | username | char (50) | NO | groupid | smallint (6) unsigned | NO | 0 | invisible | tinyint (1) | NO | 0 | action | tinyint (1) unsigned | NO | 0 | lastactivity | int (10) unsigned | NO | 0 | lastolupdate | int (10) unsigned | NO | 0 | fid | int (11) unsigned | NO | 0 | tid | int (11) unsigned | NO | 0 | + -------------- + ---------------------- + ------ + ----- + --------- + ------- + 14 rows in set (0.00 sec)
This SQL statement scans the entire table. Although the table data is not more than 10 thousand rows, the InnoDB Engine converts the data into table-level locks without using indexes, causing a high concurrency, the number of connections increases if the connection is not released because the thread cannot finish processing.
Finally, let the developer disable this function in the background to solve the problem.
This article is from the "hechun's technical column" blog. Be sure to keep this source