Join the community today
Become a Member

mysql.allow_persistent = ?

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

  1. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    7:17 PM
    Nginx-1.25.x
    MariaDB 10.3.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

    53,607
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    2:17 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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.