same with commenting out some of the data
I recommend trying to get only 1 response. Maybe that's causing a confilct
Since the function is supposed to stop being executed when a response is returned
Right on - I removed the return statement and it's running right now
Yeah same error still and same logs
You're triggering the function from SDK?
How long does it run for?
from the appwrite console
however long I set the timeout to
Maybe you're running into the timeout then
Try setting it to like 2 minutes. I think that will be enough
I was wondering so I upped it to 5 minutes and same problem
Make sure to call return like return res.json()
.
Make sure you're only passing a single string to log()
Maybe it's really taking that long
He's not calling it with JSON, but I think it should be fine anyways?
I see multiple arguments being passed to log
Oh, yes, the latest line confused me 😅
Whoops about the logs, fixed those and added a return statement to the try block and timed out at 2 minutes - it's only like 2k documents with 10 attributes but I'll up it to 10 minutes and see what happens
@Steven @D5 appreciate the help guys - I make sure to bang my head on my keyboard at least a thousand times before asking for help but this 500 error was baffling me
No issues, don't hesitate to ask anything at any time! We will always try to help 😄
@conleyc86 This got solved from what I understand, true?
Yes! The function was too slow - indexing the ingested data and batching document creation/updating solved it - function runs in under a minute
Thanks again!
Also sorry for the slow reply - this is for a personal project just revisited it today.
[SOLVED] "Error Msg: Http invalid protocol" After my function runs successfully.
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...