Want to subscribe to topics you're interested in?
Become a Member

mysql.allow_persistent = ?

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

  1. pamamolf

    pamamolf Well-Known Member

    4,022
    421
    83
    May 31, 2014
    Ratings:
    +816
    Local Time:
    7:02 PM
    Nginx-1.17.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

    50,450
    11,658
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,077
    Local Time:
    2:02 AM
    Nginx 1.25.x
    MariaDB 10.x
    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.