P
Prisma2w ago
SoxZz5

Problem with Stream on Pulse

GM, It was working in the past then we got some problem with NeonDB that have been fixed by Neon themselve Currently I'm unable to use stream() and it look like we don't have any event stored, we have activated event persistance like in the past We use a custom Publication created with this command
CREATE PUBLICATION prisma_stream_publication ADD TABLE ...
CREATE PUBLICATION prisma_stream_publication ADD TABLE ...
Which seems to work since I'm able to use subscribe() I added few log in the pulse lib directly :
[Pulse] Initializing subscription: { modelName: 'unique_sell_orders', where: undefined }
[Pulse] Connecting to WebSocket: wss://pulse.prisma-data.net/stream
[Pulse] Stream started
[Pulse] Starting ping/pong cycle
[Pulse] Starting ping/pong cycle, current readyState: 0
[Pulse] Initial WebSocket readyState: 0
[Pulse] Checking WebSocket state: 0
[Pulse] Waiting for WebSocket to open...
[Pulse] WebSocket connection opened
[Pulse] WebSocket readyState: 1
[Pulse] WebSocket opened successfully
[Pulse] Sending ping
[Pulse] Received pong
[Pulse] Pong received within timeout
[Pulse] Sending ping
[Pulse] Received pong
[Pulse] Pong received within timeout
[Pulse] Sending ping
[Pulse] Initializing subscription: { modelName: 'unique_sell_orders', where: undefined }
[Pulse] Connecting to WebSocket: wss://pulse.prisma-data.net/stream
[Pulse] Stream started
[Pulse] Starting ping/pong cycle
[Pulse] Starting ping/pong cycle, current readyState: 0
[Pulse] Initial WebSocket readyState: 0
[Pulse] Checking WebSocket state: 0
[Pulse] Waiting for WebSocket to open...
[Pulse] WebSocket connection opened
[Pulse] WebSocket readyState: 1
[Pulse] WebSocket opened successfully
[Pulse] Sending ping
[Pulse] Received pong
[Pulse] Pong received within timeout
[Pulse] Sending ping
[Pulse] Received pong
[Pulse] Pong received within timeout
[Pulse] Sending ping
So it look like Websocket work well and there is no problem on this side Have you got any idea of what can happen here ? Everything is setup looking at the doc, we use a ssl require with neon which should work, we have logical replication on Neon too, no IP allowance or things like this so must not be the problem I searched the whole day to understand what happen but I think it's on DB level and I can't fix it on my side If you need anymore code let me know, I downloaded the sample repo (basic stream without anything else) and stream doesn't work while subscribe work even in this case so can't be a NestJS problem too (cc @kipit )
No description
No description
9 Replies
SoxZz5
SoxZz5OP2w ago
+ some more info about the SQL state :
No description
SoxZz5
SoxZz5OP2w ago
No description
RaphaelEtim
RaphaelEtim2w ago
Hi @SoxZz5 Can you please share your Github handle to enable me check the logs? Please also share your email id which you used to sign up. I would recommend you to email us on [email protected] so that you can get dedicated support. We can continue conversation here as well if you prefer.
SoxZz5
SoxZz5OP2w ago
It's on a private repo :S, I can share some code if needed, but even with the basic github given by prisma stream doesn't work while subscribe yes I'm loggedin with [email protected] on Fantasy projects I think it's kipit that have created Fantasy on pulse so maybe you want his mail too ? MMh do we have to use REPLICA when creating our own publication for insert / update ? It's even worst now, we don't have event anymore, I just updated API key, didn't touched the db url etc, I got event on the 24h but not on the last 30min while I'm pretty sure (we have an event that just ended that at least 1k bid_orders for example must have been created in the last 30m)
SoxZz5
SoxZz5OP2w ago
No description
SoxZz5
SoxZz5OP2w ago
while the last 24H look like this :
No description
SoxZz5
SoxZz5OP2w ago
Ok don't mind look like we have a Neon issue :
No description
SoxZz5
SoxZz5OP2w ago
Ok don't mind look like we have a Neon issue :
No description
RaphaelEtim
RaphaelEtim2w ago
MMh do we have to use REPLICA when creating our own publication for insert / update ?
No you don't.
Want results from more Discord servers?
Add your server