imubit / data-agent-osisoft-pi

Data Agent plugin (connector) for accessing Osisoft PI Historian
GNU Lesser General Public License v3.0
0 stars 0 forks source link

OSIsoft.AF.PI.PITimeoutException when reading data even with 5000 block #7

Open cloud-rocket opened 1 year ago

cloud-rocket commented 1 year ago
<class 'OSIsoft.AF.PI.PITimeoutException'>
[-10722] PINET: Timeout on PI RPC or System Call.
   at OSIsoft.AF.PI.PIException.ConvertAndThrowException(PIServer piServer, Exception ex, String message)
   at OSIsoft.AF.PI.PIPoint.InterpolatedValuesByCount(AFTimeRange timeRange, Int32 numberOfValues, String filterExpression, Boolean includeFilteredValues)
   at OSIsoft.AF.PI.PIPoint.InterpolatedValues(AFTimeRange timeRange, AFTimeSpan interval, String filterExpression, Boolean includeFilteredValues)
Traceback (most recent call last):
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\qt_data_extractor\worker_thread.py", line 69, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\qt_data_extractor\mainwindow.py", line 410, in copy_process_run
    self._api.copy_period(
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent\api.py", line 34, in traceapi_closure
    raise e
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent\api.py", line 21, in traceapi_closure
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent\api.py", line 247, in copy_period
    self._data_exchanger.copy_period(
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent\exchanger.py", line 69, in copy_period
    ).read_tag_values_period(
      ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent\abstract_connector.py", line 29, in inner
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\KHICKEY\AppData\Roaming\Python\Python311\site-packages\data_agent_osisoft_pi\connector.py", line 388, in read_tag_values_period
    records = pt.InterpolatedValues(
              ^^^^^^^^^^^^^^^^^^^^^^
OSIsoft.AF.PI.PITimeoutException: [-10722] PINET: Timeout on PI RPC or System Call.
   at OSIsoft.AF.PI.PIException.ConvertAndThrowException(PIServer piServer, Exception ex, String message)
   at OSIsoft.AF.PI.PIPoint.InterpolatedValuesByCount(AFTimeRange timeRange, Int32 numberOfValues, String filterExpression, Boolean includeFilteredValues)
   at OSIsoft.AF.PI.PIPoint.InterpolatedValues(AFTimeRange timeRange, AFTimeSpan interval, String filterExpression, Boolean includeFilteredValues)

Troubleshooting info - https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB00232

cloud-rocket commented 11 months ago

Should add at least 1 retry on failed timeout call