#Prisma Pulse not working after a while
1 messages · Page 1 of 1 (latest)
Hey @simple moat 👋
Thank you for raising this issue here. I would like to take a look at the logs for your project to debug this issue.
Can you let me know your email id or the GitHub handle with which you signed up?
(Also, thanks for filling out the feedback form, our team has received the feedback 🙏 )
hey Nurul!
it should be under "[email protected]"
i'm very happy with Pulse so far, was able to implement real-time with ease in our dashboard and landing. would love to figure out what's going wrong here so we can move closer to using this in prod 😊
appreciate the quick response, and sorry for double posting. wasn't sure where would be appropriate to reach out 😅
Thank you for sharing the email 🙏
And no worries about double posting. We really appreciate you that you gave us feedback.
This issue happens on Development environment of project named "Flawless", right?
yeah, that’s correct
Thanks for confirming. I do see intermittent disconnections.
I have raised this with our PPg team. Please allow me to get back to you with an update as soon as possible
take your time, and let me know if you need anything from my end. i’m happy to help and definitely understand. i’ve always been a Prisma user, been waiting for Pulse since it was announced. i don’t mind the extra wait if it means Prisma improves 🙏
Thank you so much for your kind words and being a valued Prisma user. I will get back to you as soon as I have an update 🙌
@simple moat The issue should be fixed now. Can you test? We rolled out a fix yesterday
i will do some testing and report back
Great! Thank you for your assistance 🙏
tested alongside other providers, and it seems fine. there are some minor throttles happening at times, is this expected on the free tier?
yeah, it just started throttling pretty bad. this is what used to happen before it would reject the pulse streams.
prisma:query SELECT 1
prisma:query SELECT "public"."User"."id", "public"."User"."uid", "public"."User"."createdAt", "public"."User"."updatedAt", "public"."User"."username", "public"."User"."email", "public"."User"."password", "public"."User"."roles"::text[], "public"."User"."banned" FROM "public"."User" WHERE ("public"."User"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."User"."id" FROM "public"."User" WHERE ("public"."User"."id" = $1 AND 1=1) LIMIT $2 OFFSET $3
prisma:query SELECT "public"."UserStatus"."id", "public"."UserStatus"."socketId", "public"."UserStatus"."status"::text, "public"."UserStatus"."product"::text, "public"."UserStatus"."userId", "public"."UserStatus"."connectedAt", "public"."UserStatus"."createdAt", "public"."UserStatus"."disconnectedAt", "public"."UserStatus"."lastSeen" FROM "public"."UserStatus" WHERE "public"."UserStatus"."userId" IN ($1) OFFSET $2
prisma:query INSERT INTO "public"."UserStatus" ("id","socketId","status","product","userId","connectedAt","createdAt","lastSeen") VALUES ($1,$2,CAST($3::text AS "public"."Status"),CAST($4::text AS "public"."Product"),$5,$6,$7,$8) ON CONFLICT ("userId") DO UPDATE SET "status" = CAST($9::text AS "public"."Status"), "socketId" = $10, "product" = CAST($11::text AS "public"."Product"), "lastSeen" = $12 WHERE ("public"."UserStatus"."userId" = $13 AND 1=1) RETURNING "public"."UserStatus"."id", "public"."UserStatus"."socketId", "public"."UserStatus"."status"::text, "public"."UserStatus"."product"::text, "public"."UserStatus"."userId", "public"."UserStatus"."connectedAt", "public"."UserStatus"."createdAt", "public"."UserStatus"."disconnectedAt", "public"."UserStatus"."lastSeen"
[Nest] 45788 - 02/05/2025, 3:34:48 PM LOG [GatewayService] client registered: 01JJXE3APWS2ADS3ZST8SVZNBK
prisma:query UPDATE "public"."UserStatus" SET "status" = CAST($1::text AS "public"."Status"), "socketId" = $2, "product" = $3, "lastSeen" = $4 WHERE ("public"."UserStatus"."userId" = $5 AND 1=1) RETURNING "public"."UserStatus"."id", "public"."UserStatus"."socketId", "public"."UserStatus"."status"::text, "public"."UserStatus"."product"::text, "public"."UserStatus"."userId", "public"."UserStatus"."connectedAt", "public"."UserStatus"."createdAt", "public"."UserStatus"."disconnectedAt", "public"."UserStatus"."lastSeen"
[Nest] 45788 - 02/05/2025, 3:38:48 PM LOG [GatewayService] client unregistered: 01JJXE3APWS2ADS3ZST8SVZNBK
as you can see, it never streamed any events for connecting
[Nest] 43868 - 02/05/2025, 10:30:23 PM DEBUG [PulseService] Emitting "user-status" event with action: update
[Nest] 43868 - 02/05/2025, 10:30:23 PM DEBUG [PulseService] Object(5) {
action: 'update',
after: {
id: '01JJXE4AYE2P86VD7EZF94VJ1F',
socketId: 'JpbHGeBXtflZPbDMAABG',
status: 'ONLINE',
product: 'FORTNITE',
userId: '01JJXE3APWS2ADS3ZST8SVZNBK',
connectedAt: 2025-01-31T07:09:43.569Z,
createdAt: 2025-01-31T07:09:43.569Z,
disconnectedAt: null,
lastSeen: 2025-02-05T21:30:23.768Z
},
before: null,
id: '01JKC0AX59ANYXH6BA6FCBNXND',
modelName: 'UserStatus'
}
it should log like this ^
yeah, it just started throttling pretty bad.
If I understand correctly, you are not receiving events instantly, right?
The events are throttled, so you are receiving events very delayed?
yeah, at times it takes several minutes to receive events, and by then they are all queued up and send all at once
Checked with pulse team:
given the way pulse is reconnecting now at 90seconds interval, it's an expected behavior. This is going to change once we finalize the ppg extension to push events on demand
So, for now this is expected, though this will change pretty soon and you can expect faster events.
You won't notice this behaviour if your db is active and consistently sending events though:
the more the db is active, the less it's supposed to happen, though
i understand, though this was happening when i was doing pretty much constant tests. which is why i noticed it in the first place. it would stop updating the user status and throttle