Which tool versions are you using?
SDK: v14.29.0
Platform: v24.x.x
Python: v3.13
Isolation mode: venv
Current Behavior
After a worker (e.g. SCIA) has produced a result, the result is saved to ‘Viktor storage’. This is then requested from the app. However, if the result data is too large, the request will fail with a timeout error.
Expected Behavior
No TimeoutError occurs, and the result of the worker is returned to the app.
Context (optional, but preferred)
Strangely, this only occurs when developing locally. I guess the request doesn’t take as long there.
If I manually send a request with the same URL that caused the TimeoutError, it goes through after a little over 11 seconds. The error does show that a timeout of 10 seconds was provided. My guess is increasing this timeout should fix the issue. However, it might be worth investigating if/why this request takes longer than it should.
This was never an issue. But since two months it started and is a really pain in the ass as production data van no longer be used in development environments.
We have temporarily fixed this by hardcoding the request timeout for all requests to a minimum of 30 seconds with the following git patch. Note that this is by no means a permanent solution, as we have to change this manually each time the project dependencies are installed/updated.
Note: you can use this fix by pasting the following in a file and using the command git apply filename.patch
diff --git a/venv/Lib/site-packages/viktor/_vendor/requests/adapters.py b/venv/Lib/site-packages/viktor/_vendor/requests/adapters.py
--- a/venv/Lib/site-packages/viktor/_vendor/requests/adapters.py
+++ b/venv/Lib/site-packages/viktor/_vendor/requests/adapters.py
@@ -609,4 +609,5 @@
elif isinstance(timeout, TimeoutSauce):
pass
else:
+ timeout = max(timeout, 30) if timeout is not None else None
timeout = TimeoutSauce(connect=timeout, read=timeout)