S2eve Posted January 16, 2011 Share Posted January 16, 2011 Hello, need help with mysql Persistent Links Active Persistent Links value is at 0 all the time even though i turn mysql.allow_persistent On what's wrong? mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 5.1.45 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib -lmysqlclient Directive Local Value Master Value mysql.allow_local_infile On On mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off mysqli MysqlI Support enabled Client API library version 5.1.45 Active Persistent Links 0 Inactive Persistent Links 0 Active Links 0 Client API header version 5.1.54 MYSQLI_SOCKET /var/lib/mysql/mysql.sock Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/ Share on other sites More sharing options...
Pikachu2000 Posted January 16, 2011 Share Posted January 16, 2011 What function are you using to connect? mysql_pconnect ? Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/#findComment-1160310 Share on other sites More sharing options...
S2eve Posted January 16, 2011 Author Share Posted January 16, 2011 not sure. I'm using ipb and drupal, they should support it Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/#findComment-1160362 Share on other sites More sharing options...
PFMaBiSmAd Posted January 16, 2011 Share Posted January 16, 2011 Persistent database connections only work when php is running as a server module and even in those cases where they do work, you don't gain much. You must still call the code necessary to get one of the available connections/create a new connection if an existing connection is not available. You must also be using the new MySQL Native Driver, as it would appear (according to the tech writer doing the php.net documentation) that the MySQL database extensions do not support persistent connections when used with the MySQL Client Library. What exactly are you trying to accomplish? Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/#findComment-1160386 Share on other sites More sharing options...
S2eve Posted January 16, 2011 Author Share Posted January 16, 2011 sounds complicated, what do you mean by "php is running as a server module" i'm trying to improve php and mysql performance Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/#findComment-1160399 Share on other sites More sharing options...
PFMaBiSmAd Posted January 16, 2011 Share Posted January 16, 2011 A server module is an application that is built specifically to integrate with a specific web server. The converse is a more generic CGI (Common Gateway Interface) application. Also, see the persistent connection section of the php.net documentation - http://php.net/manual/en/features.persistent-connections.php Quote Link to comment https://forums.phpfreaks.com/topic/224623-active-persistent-links-value-is-at-0-all-the-time/#findComment-1160404 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.