Very slow API responses
Error
Customers are encountering slow API response times during specific periods while using Unified Odds Feed (UOF) SDKs, particularly older versions.
Applies to
UOF SDK - all versions (especially old versions)
Symptoms
In the SDK REST logs, the following symptoms may be observed:
Enlarged API Response Time: Certain endpoints, especially those fetching a single entity (e.g. summary) rather than a list (e.g. schedules), exhibit increased response times of 500ms or more.
"Task was canceled" Logs (specifically for UOF SDK .NET): Many logs indicate that tasks were canceled due to API responses not being received within the specified timeout period.
Resolution
To address slow API response times, consider the following resolution steps:
Update SDK Version: Upgrade to the latest version of the UOF SDK. Several versions include improvements aimed at mitigating slow API responses.
Transition to .NET Core: For users experiencing issues with the .NET Framework library, consider upgrading to the .NET Core version. The latest major release of .NET Core is built on .NET Standard 2.0, which supports .NET Framework 4.6.2 and higher.
Implement Retry Mechanism: Implement a mechanism within the customer's solution to retry failed API requests in a separate thread. This allows for handling occasional failures without affecting the processing of feed messages. It is encouraged to separate the processing of market data and sport event metadata to optimize performance. SDK by design does not provide any retry mechanism.
Configure Timeouts: Review and adjust timeout configurations using
ConfigurationBuilder
for critical API requests (e.g., summary, single variant market description) and other endpoints. Default timeouts are set to 5 seconds for critical requests and 30 seconds for others.
Was this helpful?