Avoid Python operator hang in TIBCO Streaming

Avoid Python operator hang in TIBCO Streaming

book

Article ID: KB0071731

calendar_today

Updated On:

Products Versions
TIBCO Streaming Up to 10.x, 11.0.0

Description

Sometimes the Python operator in TIBCO Streaming stops accepting input and the application must be stopped and restarted to restore function. 
Is there a way to prevent this operator hang from happening?

Issue/Introduction

Configure the Python operator to not capture STDOUT and STDERR output.

Resolution

Modify the Python adapter HOCON configuration found in project folder 'src/main/configurations' (type = "com.tibco.ep.streambase.configuration.adapter") to not capture output.

Change (example):
settings = {
    executable = "C:/Users/hannibal/.conda/envs/python374/python.exe"
    instance = "pythonic"
    useTempFile = "false"           
    workingDir = "${s_python_workingdir:-C:/Temp/Projects/Demo}"
    captureOutput = "true"
}
to:
settings = {
    executable = "C:/Users/hannibal/.conda/envs/python374/python.exe"
    instance = "pythonic"
    useTempFile = "false"           
    workingDir = "${s_python_workingdir:-C:/Temp/Projects/Demo}"
    captureOutput = "false"
}

The problem is that the Python adapter is not handling the output (STDOUT) and error (STDERR) streams of the Python process correctly. This is defect  "SB-51431 PYTHON: uncaught exception hangs operator" which affects all versions of TIBCO Streaming up to 10.6.3 and 11.0 as of this report (Dec  2022). This is expected to be fixed in a later release. Check the Release Notes in the product documentation to see whether this is resolved in the product version you using more recent than these versions.