Next.js Discord

Discord Forum

extend NextJS stream timeout

Unanswered
Lilac posted this in #help-forum
Open in Discord
LilacOP
NextJS seems to timeout streams after a minute, which is unfortunate if your ai thinks for 3.

14 Replies

LilacOP
I will when I get home
It could be cloudflare's 100 seconds timeout?
I solved that by using SSE and have a ping every 90 inactive seconds
LilacOP
Given the timeout is 60 sec I do not think so @Pixlengineer
@Lilac Given the timeout is 60 sec I do not think so <@774568775063830532>
I don't remember nextjs having its own stream timeout. I've been using SSE with Nextjs for as long as I started using it and it uses pure ReadableStream/TransformStream
Can you give example of what type of stream you're doing?
LilacOP
You are telling me the AI lied to me? A bot would do that to me?
@Lilac You are telling me the AI lied to me? A bot would do that to me?
You're telling me you're trusting AI over actual people with experience?
LilacOP
Jokes aside, I need to complete this in the next few hours and I am getting increasingly annoyed.
LilacOP
Heavily vibecoded, I let it change it to ReadableStream/TransformStream and it looks better. We had a lot of changes in the backend since I asked this question, so I will have to switch the endpoint first, let me get back to you once I got it to work. At the same time WTF the AI fails at getting a string form a Json? 😭
and it's solution to get the string was also to change it back to blocking mode which does timeout after 100 sec and is completely useless for the actual querries we do
LilacOP
Okay implementation complete... just one smalllll problem, no requests I send now take over a minute.