Join the community today
Register Now

PHP-FPM Does PHP-FPM have connection pooling for MySQL?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by jeffwidman, Oct 28, 2015.

Tags:
  1. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    10:39 PM
    Mainline
    10.2
    Using this now on my new server :)

     
  2. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    10:39 PM
    Mainline
    10.2
    By the way, after enabling this I experienced:
     
  3. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    10:39 PM
    1.15.x
    MariaDB 10.3.x
    On php-fpm request end, the MySQL connection is cleaned up which clears any outstanding transactions or locks. This shouldn't be making a difference unless you are on a very old version of php.

    Howvere, this can naturally happen due to how XenForo uses transactions and will sometimes mix ordering of how it accesses tables.

    For example, if a user deletes a couple of posts quickly from a very long thread this can easily trigger it depending on conditions.
     
    Last edited: Mar 5, 2016
  4. rdan

    rdan Well-Known Member

    5,452
    1,418
    113
    May 25, 2014
    Ratings:
    +2,212
    Local Time:
    10:39 PM
    Mainline
    10.2
    PHP 7.0.4 here.

    I only experienced it though once I enable debug mode on admin page.
    [​IMG]
     
  5. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    10:39 PM
    1.15.x
    MariaDB 10.3.x
    I don't have any issue with this on my testing setup in debug mode. But it doesn't have the load of a real website which may be causing issues.