I am implementing http post req.
So i have a update function (contains quite large calculations and updates), and I tried calling that function using http_req_update method. But receiving Internal Server error everytime.
Seems http_reqs are working fine. There has been some kind of timeout, because my update method is taking too long. So just wanted to know if there any timeout thing for http_reuests ? Is there any way i can change that?
Additional question : Why too many awaits inside a single function gives ingress expiry error? While doing same thing (what await functions were doing) fixes the error.
PS : the update function which i was calling is taking 25sec of time to get called individually.
I’m not aware of any explicit timeouts, but any function has a limit on how long it may run before it gets cancelled. In that case you should get an error message like
cycles limit exceeded.
Ingress expiry errors usually mean that your system time and the one of the IC don’t quite match up. This should (at least from what I know) not be affected by the number of awaits. Any chance you could show something to reproduce this?
I don’t quite follow. Can you explain this a bit more?
Calling an update function from canister candid is taking around 20-25 sec, but calling same via post request using postman or any other platform giving internal server error.
When do we get ingress expiry? using Time.now() checks system time and IC time? producing this error?
awaiting within a query method? That won’t work - queries are not allowed to await other methods for now.
Ingress expiry errors happen when your call’s timestamp and the time of the IC differ by more than ~5 minutes.
No, awaiting inside http_request_update function.
Hm, weird. Do you have the code somewhere so I can take a look at it? Or more detailed output / error messages? I think I can’t help any further just from the descriptions. If you prefer private messages that’s fine too