Replies: 12 comments 17 replies
-
I am interested in this as well |
Beta Was this translation helpful? Give feedback.
-
I am interested in this as well!!! |
Beta Was this translation helpful? Give feedback.
-
Please help |
Beta Was this translation helpful? Give feedback.
-
I'd like to know too. |
Beta Was this translation helpful? Give feedback.
-
this guy has an answer: https://www.youtube.com/watch?v=CDZg3maL9q0 |
Beta Was this translation helpful? Give feedback.
-
Would love to see this functionality |
Beta Was this translation helpful? Give feedback.
-
This works locally but in production (hosted on vercel) the requests are still sequential. |
Beta Was this translation helpful? Give feedback.
-
Please add this |
Beta Was this translation helpful? Give feedback.
-
Creating 20 parallel requests is a bad idea when using serverless functions, since they will likely all encounter cold starts. Not to mention that it wont work if you have any noticeable number of concurrent users, due to the limit of 1000 active functions at the time. Your best bet is to rewrite this as a single action. If you really need to get responses for individual operations as soon as they are done then serverless functions simply aren't a good choice. |
Beta Was this translation helpful? Give feedback.
-
I'm actually wondering why server actions work like that too ? Why is it implemented like this ? Is it likely to change or should I implement my requests differently ? |
Beta Was this translation helpful? Give feedback.
-
This is such a huge gripe when using server-actions, please fix |
Beta Was this translation helpful? Give feedback.
-
Actually, this is quite easy to do with icflorescu/next-server-actions-parallel, if you're looking for a ready-made solution. |
Beta Was this translation helpful? Give feedback.
-
Summary
I need to send like 20 requests, one at a time using a server action. Any ideas on how to do this in parallel? I want to keep track of each request on a client-side component using the useTransition / isPending flag.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions