voxpelli/node-connect-pg-simple

If at the first try to create the session table the database is down, the store fails forever

bk-jb opened this issue · 3 comments

bk-jb commented

Because the tableCreationPromise Promise does not care for success, the failing one is kept forever and the store will not recover.

Some may consider it an edge case, but I find it problematic for use in cloud services, as it is not always 100% sure that database containers spawn before the node container a web page/service using this lib is running on. This is where I stumbled over this issue. It would be nice to be reliably able to spawn containers no matter whether the database is there already.

bk-jb commented

I have created a pull request for a patch I have tested, #269

Thanks for the PR! I have proposed an alternative fix that should avoid this issue ever occurring: #285

Closing in favor of merged #285, thanks for the PR though and sorry for the lack of attention from me!