June 18, 2013

Comment: Are PHP persistent connections evil ?

… is not something persistent connections are designed for. I would agree persistent connections are often misused. Unless you have hundreds of connections per second you quite likely do not need persistent connections and unlikely…

Comment: Wishes for new "Pure PHP" MySQL driver

persistent connections – Apache would never act as connection pooling daemon as connections can’t be shared between processes. Simply if there are too many persistent connection as connections are closed…

Comment: Are PHP persistent connections evil ?

The other issue with using persistent connections is that they are simply not needed in a well … then use persistent connections. Now, the blog, the user counter, the ad program and the forum all make their own connection. So, each Apache process has 4 persistent connections to the database. Solve that user error…

Comment: Wishes for new "Pure PHP" MySQL driver

… with frequent case of one query per request make persistent connections relevant again.” Persistent connections were irrelevant? I can see where they’d incur…/MySQL world that persistent connections were a bad thing. I would think with appropriate limits on the maximum number of persistent connections, Apache itself…

Comment: Why do you need many apache children ?

…. Since the connection cost for connecting to MySQL is relatively low compared to other databases, I usually recommend not using persistent connections with Apache web servers so that database connections are not consumed by processes that are…

Comment: HandlerSocket on SSD

… both PHP and Perl, under certain conditions. i.e not persisting the connection / index objects. However, I managed 150,000 qps (all… almost identical limit (10,500), and then got failed connects… So using persistent connection objects for both MySQLi and HandlerSocket access methods I…

Comment: HandlerSocket on SSD

… both PHP and Perl, under certain conditions. i.e not persisting the connection / index objects. However, I managed 150,000 qps (all… saturated) using 50 client threads when keeping the connection and opened index objects persistent… but this dropped to 10,000 qps if… almost identical limit (10,500), and then got failed connects… So using persistent connection objects for both MySQLi and HandlerSocket access methods I…

Comment: MySQL Limitations Part 4: One thread per connection

Connection pools and persistent connections have the weakness: They must fully reset the connection between uses. Otherwise, state held from a previous unrelated session… least two round trips anyway. Connection pools / persistent connections also suffer from a “stale connection” problem, where a connection which has not been used for…

Comment: Are PHP persistent connections evil ?

I you are only reading data, persistent connection is a good option if not the best. If you are updating data, think twice and undertand the risks and problems using a persistent connection. If you are using transactions, persistent connections do not apply.

Post: Wishes for new "Pure PHP" MySQL driver

… your application and caching them. Persistent Connections Ajax applications with frequent case of one query per request make persistent connections relevant again. Automatic load… applications. Query Timeouts Make it easy to specify timeouts for connects and query execution so page would not timeout but you…