-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Massive slowdown in using shutdownAsync vs shutdown #129
Comments
Update Using posthog.debug() reveals the problem is:
So I believe these issues are linked: #127 |
Definitely a duplicate of #127—but I’m commenting to add that yes, |
This should be fixed in the latest version as of #132 If not please feel free to re-open. |
@benjackwhite assuming you forgot to close the issue, closing it! |
Bug description
Not sure if this has to do with some issue on the ingestion level or something but recently we noticed that calling
await posthog.shutdownAsync()
was holding up the execution thread for around 9 seconds! Switching from shutdownAsync to just shutdown seemed to fix the issue.We're deploying in Next.js using vercel so under the hood these are either edge functions or AWS lambda functions. I think in this case it's an edge function.
How to reproduce
Related sub-librarie
Additional context
I think this issue might relate to edge functions on vercel. Additionally from digging into the source code, it seems like this is the only difference between the versions in posthog-node.ts:
So maybe it's an issue with feature flags?
Also more than possible this is a user issue and it's something I'm doing wrong. We recently moved to vercel and started noticing this slowing us down...
The text was updated successfully, but these errors were encountered: