Hi there,

Again, the SHOW instruction is not compatible between PostgreSQL and MySQL. So if possible, avoid! Right now, I'm getting those errors in PostgreSQL:

  • warning: pg_query() [function.pg-query]: Query failed: ERROR: unrecognized configuration parameter "processlist" in /usr/clients/www_html/new.m2osw.com/public_html/includes/database.pgsql.inc on line 185.
  • user warning: query: SHOW PROCESSLIST in /usr/clients/www_html/new.m2osw.com/public_html/sites/all/modules/boost/boost.module on line 3624.

I see the following around line 3628:

  $now = _boost_microtime_float();
  $total_time = $now - $timer;
  if ($total_time > 59) {
    $total_time = $now;
    //Ping Database to keep connection alive
    db_query("SHOW PROCESSLIST");
  }

I would think that a "SELECT 1" would do the trick. You may want to test with MySQL, although I do not think that I'd lose my PostgreSQL connection anyway, but if some people need that feature, a "SELECT 1" should do. (unless somehow that does not travel on the network connection?! Would the frontend know how to parse the SQL orders?)

Thank you.
Alexis

Comments

AlexisWilke’s picture

Okay! Now I understand why I had 5 pages of the error! 8-)

The $timer is not being reset properly! You want to set $timer to $now, not $total_time...

  if ($total_time > 59) {
    $timer = $now;  <-- this line is wrong in your current version.
    //Ping Database to keep connection alive
    db_query("SHOW PROCESSLIST");
  }

Thank you.
Alexis

mikeytown2’s picture

Status: Active » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.