When running a long process the DB connection can be dropped. Pinging the DB would keep the connection alive.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

I think system_get_files_database() would be a good "db ping" function. $files would be an empty array and $type could be 'db_ping'.

mikeytown2’s picture

Status: Active » Needs work
FileSize
2.02 KB

Patch still needs to take into account not running under drupal. Other than that it should be ready to go.

mikeytown2’s picture

Status: Needs work » Fixed
FileSize
2.12 KB

The following patch has been committed to 6.x & 7.x

Status: Fixed » Closed (fixed)

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