Hi,
In config.php there is this parameter:
$pnconfig['pconnect'] = '0';
If is set to 1, database connection use persistent connection.
What is the interest of such a connection ?
Performances ?
thx,
chaK!
Login
Donate to Zikula
Installation, Configuration, & Upgrades
::
database persistent connections ?
-
-
see e.g. http://ca3.php.net/manual/en/function.mysql-pconnect.php
Quote
mysql_pconnect() acts very much like mysql_connect() with two major differences.
First, when connecting, the function would first try to find a (persistent) link that's already open with the same host, username and password. If one is found, an identifier for it will be returned instead of opening a new connection.
Second, the connection to the SQL server will not be closed when the execution of the script ends. Instead, the link will remain open for future use (mysql_close() will not close links established by mysql_pconnect()).
This type of link is therefore called 'persistent'.
with connect a connection is being established for each operation, with pconnect it is opened once and kept in pool for the applications lifetime. persistent connections concept allows the elimination of several types of overheads, e.g. authentication is performed only once, and so extra network traffic is saved.
the counterside: each connection takes up resources. - MySQL internal resources (memory, table cache elements, connections) as well as OS level resources - threads, open files and sockets.
IMHO one should stick with connect as long as one did not benchmark the application in the specific enviroment to see if persistent connections really give a performance benefit
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::.. -
Quote
IMHO one should stick with connect as long as one did not benchmark the application in the specific enviroment to see if persistent connections really give a performance benefit
ok thx
chak!
Users online
- Guite,
- HalbrookTech,
- Simon,
- Straus,
- billthecat,
- claus.parkhoi,
- craigh,
- nestormateo,
- paulus1234,
- pheski,
- relocate2bc,
- shiner68467
