devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
52 stars 16 forks source link

Hanging time series request #44

Closed vmarunov closed 6 years ago

vmarunov commented 6 years ago

If requesting TS after TS-request which return empty response (e.g. invalid RIC), then request may be hang. When request hang, python process has 100% cpu utilisation.

Not all RIC give this effect.

For example:

Process hang:

import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb('./pyrfa.cfg')
p.acquireSession('Session1')
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setTimeSeriesPeriod('daily')
ts = p.getTimeSeries('AAA')
ts = p.getTimeSeries('ZMW=')

Process not hang:

import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb('./pyrfa.cfg')
p.acquireSession('Session1')
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setTimeSeriesPeriod('daily')
ts = p.getTimeSeries('AAA')
ts = p.getTimeSeries('EUR=')
wiwat-tharateeraparb commented 6 years ago

@vmarunov Can you upload the PyRFA log file for the hanging one?

vmarunov commented 6 years ago

@wiwat-tharateeraparb pyrfa log and console log in attachment. log.zip

wiwat-tharateeraparb commented 6 years ago

@vmarunov What if you run it without prior undefined RIC 'AAA' e.g.:

import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb('./pyrfa.cfg')
p.acquireSession('Session1')
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setTimeSeriesPeriod('daily')
ts = p.getTimeSeries('ZMW=')

Would you run into the same situation?

vmarunov commented 6 years ago

@wiwat-tharateeraparb If I run it without prior undefined RIC then all request pass normally.

wiwat-tharateeraparb commented 6 years ago

@vmarunov We might have a fix but we don't have ZMW= timeseries data to test. Are you able to help us test? If so, please send an email to our support@devcartel.com and we will send a new binary to test out. Thanks.

wiwat-tharateeraparb commented 6 years ago

8.5.2 released today fixes this issue. (Thanks @vmarunov for helping with the test)

vmarunov commented 6 years ago

@wiwat-tharateeraparb Thanks