repair connection lost in memory database