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

Comments

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'.

Status:Active» Needs work
StatusFileSize
new2.02 KB

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

Status:Needs work» Fixed
StatusFileSize
new2.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.