[RndTbl] hung mysql transaction locks after a php runtime error?

Adam Thompson athompso at athompso.net
Sat Aug 1 01:17:29 CDT 2020


On 2020-07-31 23:24, Trevor Cordes wrote:
> Does anyone have any guess what sort of performance hit my site would
> take if I turned off all of PHP's mysql connection persistence?  Does
> starting a new connection for each hit really take that many cycles?

AFAIK, if you're using local (AF_UNIX) socket connections, MySQL still 
has the lowest connection "cost" of any major database.  Which isn't 
trivial, but should be low enough you can almost ignore it.  Connections 
over AF_INET (even to 127.0.0.1) are much more expensive, but still 
pretty cheap.  It'll become a problem at scale, I think, if you're 
establishing hundreds of new connections per second.  Not 100% sure.
-Adam


More information about the Roundtable mailing list