You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I properly receive "notification" events when I issue a LISTEN query, but the connection seems to timeout rather fast (about 15 seconds in). I can't seem to find anyway to prevent the timeout or catch it when it happens. Any existing solution to this ?
pg.connect is use to create pooled connections. Using a connection pool connection for listen events really isn't supported or a good idea though I can see how this could be a very easy mistake to make.
To 'listen' a connection by definition must stay open permanently. For a connection to stay open permanently it can never be returned to the connection pool.
Try creating a stand-alone client when you need to handle listen events:
I properly receive "notification" events when I issue a LISTEN query, but the connection seems to timeout rather fast (about 15 seconds in). I can't seem to find anyway to prevent the timeout or catch it when it happens. Any existing solution to this ?
The text was updated successfully, but these errors were encountered: