idaholab / Deep-Lynx-Python-Package

Other
5 stars 0 forks source link

API requests occasionally hang #2

Closed brandon-biggs closed 2 years ago

brandon-biggs commented 2 years ago

About 90% of the time when I perform a GET request, the commands seem to hang for an extended period of time. I haven't tried any POSTs yet, but I'm looking for a solution to these hanging GETs.

Here is a simple health check that reproduces the frozen script:

import deep_lynx
from deep_lynx.rest import ApiException
from pprint import pprint

configuration = deep_lynx.configuration.Configuration()
configuration.host = 'http://localhost:8090'

api_instance = deep_lynx.MiscApi(deep_lynx.ApiClient(configuration))

try:
    # Health
    api_response = api_instance.health()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscApi->health: %s\n" % e)

print("hi")

Response:

"b'OK'"
hi
<Hanging indefinitely>
brandon-biggs commented 2 years ago

This seems to be a python3.8 issue with multiprocessing - https://bugs.python.org/issue39360

This issue can be closed.