Handling Long-Running Server Functions in Next.js: Seeking Alternatives to Vercel Time Limits

Hey everyone! I'm working on a Next.js project where I need to sync and handle all new emails from an email server to a database. This process can take a couple of minutes, but I've noticed that Vercel has time limits of 10 seconds on the free hobby plan and 1 minute on the pro plan. Unfortunately, these limits are too short for my use case. Can you share any insights or alternatives you've used to handle long-running server functions in Next.js? Thanks in advance for your help!
6 Replies
Neto
Neto2y ago
you have to either: dont use vercel/a serverless platform or run next as a long running service
Eternal Mori
Eternal MoriOP2y ago
Do you mean sst.dev?
Neto
Neto2y ago
yeah
Neto
Neto2y ago
SST
How to use queues in your serverless app
In this example we will look at how to use SQS in your serverless app on AWS using SST. We'll be using the Api and Queue constructs to create a simple queue system.
Neto
Neto2y ago
you dont need to host the entire app using sst, just the queue/possible cron would be enough
Eternal Mori
Eternal MoriOP2y ago
Thanks @nyx (Rustular DevRel) for your suggestion, I will do my research!
Want results from more Discord servers?
Add your server