Learn about Centmin Mod LEMP Stack today
Register Now

mysql.allow_persistent = ?

Discussion in 'System Administration' started by pamamolf, Jul 22, 2014.

  1. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    1:16 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    What is your experience using or not persistent connections on php.ini ?

    Is it better on or off for better performance and server load?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    8:16 AM
    Nginx 1.13.x
    MariaDB 5.5
    A php web apps persistence to mysql is determined by the php web apps coding itself. The mysql http://php.net/manual/en/mysql.configuration.php#ini.mysql.allow-persistent and mysqli http://php.net/manual/en/mysqli.configuration.php#ini.mysqli.allow-persistent set *.allow-persistent so be left alone at defaults as it is just a global setting to whether to allow or not allow mysql or mysqli to set and enable persistence when the individual php web app wants to control it (set persistance on or off).

    so whether it's better to have persistent connections from php and mysql depends entirely on the php web app in question and your traffic/load patterns.