Problems with MySQL concurrency

Source: Internet
Author: User
$sql = "Select D.*, U.nickname,u.dkday from users as U-OUTER JOIN dklist as D on (u.uid = D.uid) $where ORDER by $or Dername DESC LIMIT ". ($page-1) * $pageSize. ', '. $pageSize;
$result = mysql_query ($sql);
The above page code in the site first page load run, take the first pages of data.
Day PV3500, the total number of connections to the limit, should not be.
What do you think is causing the connection pool to be full?

It will be about 20 minutes, and now the number of concurrent connections in MySQL tune is 1500.


Reply to discussion (solution)

You're using a long connection (mysql_pconnect)

You're using a long connection (mysql_pconnect)

In a language.

Is the System 2003?

Linux Systems

There really is no long link
$_sc[' pconnect '] = 0; Database Persistent Connection 0 = off, 1 = Open

Should be open after connection is not closed

Mysql_close ();

Close, monitoring even after less than a second to go, concurrency is definitely super 100, set of the 1500 did not work is how it happened.

The concurrency setting doesn't work, and another site uses the same database, a lot of sleep processes ....

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.