Fixed a major flaw, database connections must be renewed

The database connection expires after 8 hours, leading to many
problems because the original daemon made the connection once
and assumed that it would stay open until closed...