Can you share more details? What does

Can you share more details? What does the full error message return? Just connection error? How many concurrent Workflows are running?
9 Replies
darren
darren2w ago
Sure! I’ll try to clarify. This is the error message I receive when making a request to Cloudflare AI via OpenAI’s node package.
{
"name": "Error",
"message": "Connection error."
}
{
"name": "Error",
"message": "Connection error."
}
I get a similar error when making a request to Resend.
{"name":"application_error","message":"Unable to fetch data. The request could not be resolved."}
{"name":"application_error","message":"Unable to fetch data. The request could not be resolved."}
I’m unsure how to inspect the raw http request to see if there are more details. There is only one workflow running at a time. It's triggered via a scheduled action. Within the workflow, I’m making about 20 network requests, but it’s just the post requests that seem to fail. (The app is an RSS reader for context, I fetch data from all of the feeds and then save the results to D1).
darren
darren2w ago
Here is my actual workflow code as well. Just let me know if there's anything else that would be helpful!
elithrar
elithrarOP2w ago
Is that ONLY for the OpenAI/AI request?
darren
darren2w ago
It's also for the request to Resend which happens in the last step. I'll mention again that this used to work consistently, now it fails almost every time, but it has still succeeded on occasion which makes it harder to find the fault in my implementation.
elithrar
elithrarOP2w ago
@Diogo Ferreira to look into this. We haven’t had any major reports here - you still have a paid plan, correct?
darren
darren2w ago
I'm currently on the free plan. From what I could tell I should still be under the limits, but I could be wrong.
elithrar
elithrarOP2w ago
Are you positive you’re doing less than 50 API requests per Workflow instance? The free plan limit is 50 subrequests per incoming request.
darren
darren2w ago
Ah the subrequests could be it. It’s likely that there are some get requests that actually return redirects. That could be why the total number of subrequests are higher than i might have expected! I’ll experiment when I have some more time later today. That was totally it! Thanks for the help. I didn't realize there was a limit on subrequests. Another follow up question. If I had 100 users and I needed to make 1 request per user, would I be better off starting 100 concurrent workflows, 1 for each user? Or 1 workflow that loops through all of the users and makes each request? Or would the subrequests from each workflow count towards the same request?
elithrar
elithrarOP2w ago
Each Workflow invocation is a “request” - so each Workflow is limited. You also have the limit on max concurrent Workflows (esp on the free plan). I would run one instance per user so they are discrete.

Did you find this page helpful?