#Prisma Pulse not working after a while

1 messages · Page 1 of 1 (latest)

grim meadowBOT
#

You selected the carefully hand-crafted route. A dev artisan will respond soon. Meanwhile, the #ask-ai channel awaits if you're curious!

rose vale
#

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 🙏 )

simple moat
rose vale
#

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?

rose vale
#

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

simple moat
rose vale
#

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 🙌

rose vale
#

@simple moat The issue should be fixed now. Can you test? We rolled out a fix yesterday

simple moat
rose vale
#

Great! Thank you for your assistance 🙏

simple moat
simple moat
#

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 ^

rose vale
#

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?

simple moat
rose vale
#

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

simple moat