MastraM
Mastra9mo ago
Saulved

Cloudflare Error 524 When Using Mastra Stream API

Hey Team

I'm experiencing consistent Cloudflare Error 524 timeouts when trying to use the Mastra Stream API in my application. I believe this is an issue with the Mastra server taking too long to respond rather than an issue with my implementation.

You lads down?

Error Details
When making a request to the stream API:

const mastraResponse = await myAgent.stream({
messages: messages,
...streamOptions,
});


I consistently receive a Cloudflare 524 timeout error.


Further Technical Details
Server: Node.js with Expo EAS hosting
Client library: @mastra/client-js (latest version)
Prompt length: Typical conversational text (not unusually long)
Configuration includes retry logic and backoff parameters
Was this page helpful?