we are still struggling with the timeout issue when executing the function. I just migrated from self-host to appwrite cloud. but I still face a problem, 1-2 out of 10 requests are falling.
we need to check the logs and fix the problem.
failed function id: 65bca0e9badb30f85e9d project id: 65bc9440a1dc894315ea
@Core who can check the logs?
Let me test the local one right now.
Are you able to share the full schema of your relationships? So far I see you have:
branches <-> organization branches <-> receipts branches -> pos_config branches -> address receipts <-> transactions receipts -> pos_system
Yesterday I created a demo project with exact copies. I can invite you there if you give me your email.
@Jake
wow i can't only one member
i will send personal message
@Jake
I would be very glad if you would help
Could you please add me to the repo with the function code? https://github.com/abnegate
Or just share the full code over DM if it's easier
i send invite
@Jake I can invite you to join the appwrite which is self-hosting installed.
there is more error observed there
pls send me your email
you can test this endpoint https://receipt.core.pai.kg/receipt?branchId=6592a5aacea01097e372&tablet_id=1
sometimes the timeout occurs after several requests, sometimes after a lot of requests. I assume that the branch model is cached and the request responds quickly. but at some point getdocument(branch) freezes.
can relationship queries turn into recursion?
Two-way relationship could it be a source of recursion?
Yeah, internally the relationships are fetched recursively, but there's a max of 3 levels of recursion, which is why on the third level you get null for any further relationships.
We also detect cyclic relationships across collections and short-circuit them so they're only fetched once to avoid an infinite loop.
Fetching from any of the collections via console, client and server SDKs are all working okay, so I would rule out a relationship bug.
Tried the same code with a PHP function instead and got the same issue so it's not node specific, seems to me to be function related. Back to you @Meldiron 😅
did you manage to get a timeout problem too?
Yeah I did, but only in functions. Manually using console and SDKs worked okay. Tried the same code in a PHP function and got the same issue so it's not runtime specific either
do you have any suggestions or ideas to solve the problem? we are a startup and should have launched 2 weeks ago, but because of this problem we are standing still.
Recommended threads
- I now have the Github Student Developer ...
I have access to the Github Student Developer Pack, and it states Appwrite is included but when i try to access it, it says i dont have it. im thinking this is ...
- Trying to deploy on paid cloud plan and ...
Trying to deploy on paid cloud plan and receiving: no space left on device, write
- Bandwidth limit for your organization ha...
I received an alert that I exceeded the Free plan bandwidth limit (showing 5.86 GB), but my dashboard tells a different story. The usage stats there are much lo...