Lazily get first database connection

This should make deployment more reliable.