You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are two general places where a default timeout is specified. The CONNECT_TIMEOUT_DEFAULT in the RestApiClient.py, which is currently set to 2 seconds, and DEFAULT_TIMEOUT in the TimeoutHTTPAdapter, which is currently set to 5 seconds. Now that stix-shifter supports async API calls, these values can be raised, or at least passed through as configurable options.
Describe the solution you'd like
Timeout values can be configured to be higher if needed.
The text was updated successfully, but these errors were encountered:
If I understand the timeout issue right, it is caused by mixing the CPU-bound translation in IO-bound-intended asyncio (good for transmission). Increasing the timeout mitigates the problem, but the existence of the timeout indicates asyncio is blocked and not working as expected.
Another thing we may do is to educate users of stix-shifter on using the library: splitting translation and transmission as discussed in #1493 (comment) so asyncio will be effective---instead of simply calling translation and transmission as async functions, one needs to wrap the sync version of translation into run_in_executor() or use multi-processing since translation in essence is a CPU-bound task, which may not be helpful to run in async mode.
Is your feature request related to a problem? Please describe.
There are two general places where a default timeout is specified. The CONNECT_TIMEOUT_DEFAULT in the RestApiClient.py, which is currently set to 2 seconds, and DEFAULT_TIMEOUT in the TimeoutHTTPAdapter, which is currently set to 5 seconds. Now that stix-shifter supports async API calls, these values can be raised, or at least passed through as configurable options.
Describe the solution you'd like
Timeout values can be configured to be higher if needed.
The text was updated successfully, but these errors were encountered: