Discuz论坛之大坑!各位坛主请注意!
今天论坛打开了这个会话功能,结果很荣幸踩坑里了,连接数直接给干到2000开外。好了,直接上图说下:showprocesslist,满屏显示这条SQL,情急之下,立即pt-kill
今天论坛打开了这个会话功能,结果很荣幸踩坑里了,连接数直接给干到2000开外。
好了,直接上图说下:
show processlist,满屏显示这条SQL,,情急之下,立即pt-kill,先让论坛活下来。顺便想问候下discuz开发,你们真的做了测试了吗,就直接发布了?
表结构:
mysql> desc pre_common_session; +--------------+----------------------+------+-----+---------+-------+ | 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)由于该SQL导致全表扫描,虽然表数据不多1万多行,但InnoDB引擎在没有使用到索引的情况下,会转为表级锁,并发一大,线程处理不完,连接不释放,连接数就会上升。
最终让开发在后台关闭该功能,解决之。
本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The solution to the Discuz background login problem is revealed. Specific code examples are needed. With the rapid development of the Internet, website construction has become more and more common, and Discuz, as a commonly used forum website building system, has been favored by many webmasters. However, precisely because of its powerful functions, sometimes we encounter some problems when using Discuz, such as background login problems. Today, we will reveal the solution to the Discuz background login problem and provide specific code examples. We hope to help those in need.

What should I do if my Black Shark phone cannot be turned on? Teach you how to save yourself! In our daily lives, mobile phones have become an indispensable part of us. For many people, the Black Shark mobile phone is a beloved gaming phone. But it is inevitable that you will encounter various problems, one of which is that the phone cannot be turned on. When you encounter such a situation, don't panic. Here are some solutions that I hope will help you. First of all, when the Black Shark phone cannot be turned on, first check whether the phone has enough power. It may be that the phone cannot be turned on due to exhausted battery.

A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

"Exploring Discuz: Definition, Functions and Code Examples" With the rapid development of the Internet, community forums have become an important platform for people to obtain information and exchange opinions. Among the many community forum systems, Discuz, as a well-known open source forum software in China, is favored by the majority of website developers and administrators. So, what is Discuz? What functions does it have, and how can it help our website? This article will introduce Discuz in detail and attach specific code examples to help readers learn more about it.

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

Black Shark is a smartphone brand known for its powerful performance and excellent gaming experience. It is loved by gamers and technology enthusiasts. However, just like other smartphones, Black Shark phones will have various problems, among which charging failure is a common one. Charging failure will not only affect the normal use of the mobile phone, but may also cause more serious problems, so it is very important to solve the charging problem in time. This article will start with the common causes of Black Shark mobile phone charging failures and introduce methods to troubleshoot and solve charging problems. I hope it can help readers solve the problem of Black Shark mobile phones.

What should I do if I encounter an incorrect Discuz password? Quick solution sharing! Discuz! It is a very popular forum program that provides users with a platform for convenient communication. Using Discuz! When accessing a forum, sometimes you may encounter an incorrect password, which may cause users to be unable to log in and use the forum normally. Well, meet Discuz! When the password is wrong, how should we quickly solve the problem? Some solutions will be shared below, with specific code examples provided for reference. 1. Check whether the password

Title: To solve the problem that Discuz WeChat shares cannot be displayed, specific code examples are needed. With the development of the mobile Internet, WeChat has become an indispensable part of people's daily lives. In website development, in order to improve user experience and expand website exposure, many websites will integrate WeChat sharing functions, allowing users to easily share website content to Moments or WeChat groups. However, sometimes when using open source forum systems such as Discuz, you will encounter the problem that WeChat shares cannot be displayed, which brings certain difficulties to the user experience.
