Thread Freezing Issue with ld.discovery.Chain After Failed Requests

Hi team,
We're encountering a critical issue when using ld.discovery.Chain
to fetch futures option chain constituents. When making multiple sequential calls to ld.discovery.Chain(universe).constituents
, if one call fails with an LDError
, subsequent calls cause the Python instance or thread to freeze.
Issue Description:
- Multiple calls to
ld.discovery.Chain(universe).constituents
work fine individually - However, if one call fails and throws an
LDError
, the next call in the sequence freezes - The freeze occurs specifically at line 95 in
lseg.data.delivery._stream._stream
Code Example:
if __name__ == '__main__':
import lseg.data as ld
ld.open_session()
def _fetch_option_chain(universes: list[str]) -> None:
for univers in universes:
print(f"starts fetch option chain for univers '{univers}'")
try:
ld.discovery.Chain(univers).constituents
except ld.errors.LDError:
print(f"error occurred for univers '{univers}'")
print(f"finished fetch option chain for univers '{univers}'")
_fetch_option_chain(["0#CLQ25+", "0#CLU25+"]) # freezing when fetching 0#CLU25+ after 0#CLQ25+ failed (one thread occupied)
_fetch_option_chain(["0#CLU25+"]) # works
ld.close_session()
Current Workaround: We've temporarily resolved this by closing and reopening the session after each LDError
, but this doesn't address the underlying threading issue and impacts performance.
Environment:
- Python version: 3.13
- lseg.data version: 2.1.1
Could you please investigate this threading/connection state issue? It appears that failed requests are not properly cleaning up their resources, causing subsequent requests to hang.
Thanks for your assistance.
Answers
-
@Gurpreet @raksina.samasiri any update ?
0 -
Thank you for reaching out to us.
It may relate to this discussion.
The development team is aware of the issue and is actively working on a fix. Based on my check, the fix is expected to be released by the end of Q3.
1
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 35 Data Model Discovery
- 697 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.2K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 2.9K Elektron
- 1.5K EMA
- 256 ETA
- 564 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 283 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 769 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 122 Open DACS
- 1.1K RFA
- 107 UPA
- 194 TREP Infrastructure
- 232 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 98 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛