ECSHOP info:can ' t pconnect MySQL Server (localhost:3306)!

Source: Internet
Author: User
Tags pconnect

Ecshop default is the normal connection method, from the error shows that you are using the pconnet way, this way when the concurrency ratio is large, there are the following shielding end:

Apache Module Mode:
The difference is that when PHP is running as an Apache module, because Apache has a process pool, a httpd process is put back into the process pool, which makes the MySQL connection resource opened with Pconnect not be freed, so there is the next connection request that can be reused.

This makes the time when the Apache concurrent access volume is not large, because of the use of Pconnect, PHP saves a number of times to connect to the DB, resulting in faster access. This should be better understood.

However, when the Apache concurrent access is large, if you use Pconnect, because some of the previous httpd processes occupy the MySQL connection is not close, it may be because MySQL has reached the maximum connection, so that some subsequent requests will never be satisfied.

For example:
If the maximum number of MySQL connections is set to 500, and Apache has the maximum number of simultaneous accesses set to 2000
Assuming all accesses require access to the DB, and the operation time is longer

The httpd of the current 500 requests is not at the end of the time ... Subsequent HTTD processes are unable to connect to MySQL (due to the maximum number of MySQL connections already reached). MySQL can be connected only if the current 500 httpd processes are terminated or reused.

ECSHOP info:can ' t pconnect MySQL Server (localhost:3306)!

Related Article

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.