Replies: 1 comment 2 replies
-
Hey @ssyberg, what is happening here is that you are not awaiting your This will probably tie up your server / local Node process itself. There's not much Payload can do to solve this, so I will convert this to a discussion, but if you do need to do things like this, you have some Node-based options like split out into different threads / etc. to perform that work. I'm also not hugely knowledgable on using multiple Node threads either to be honest but would be interested to hear what you find here! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Link to reproduction
No response
Describe the Bug
Apologies if this is expected behavior, my grasp of sync/async node is not stellar but this does smell a bit funny to me. I'm finding that if an
afterChange
hook does a lot of long running nonblocking work (in my case it's a few thousand record updates), it still blocks admin completing and generally leads to a timeout.To Reproduce
Create the below collection and save a record, you'll see that the record itself is immediately created but then admin is stuck on the "loading" screen indefinitely and eventually times out.
Payload Version
2.7.0
Adapters and Plugins
db-mongodb
Beta Was this translation helpful? Give feedback.
All reactions