SCIA Binding problems

Since the update to SDK v12.6.0 the generation of a xml for SCIA seems not to work in certain situations. The command input_xml = model.generate_xml_input() sometimes gives the following error:

Traceback (most recent call last):
  File "viktor_connector/connector.pyx", line 636, in connector.Job.execute
  File "viktor/core.pyx", line 1559, in viktor.core._handle_job
  File "/usr/src/app/app/RoadTrafficCombiCalculator/controller.py", line 61, in create_scia_file
    consequence_class=params.load_selection.loads.consequence_class,
  File "/usr/src/app/app/applib/use_cases/create_scia_file.py", line 148, in create_scia_file
    input_xml = model.generate_xml_input()
  File "viktor/external/scia/scia.pyx", line 1926, in viktor.external.scia.scia.Model.generate_xml_input
  File "viktor/core.pyx", line 1188, in viktor.core._post_on_addon_endpoint
  File "/usr/src/packages/viktor/_vendor/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/src/packages/viktor/_vendor/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/src/packages/viktor/_vendor/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/src/packages/viktor/_vendor/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
viktor._vendor.requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='addons.viktor.ai', port=443): Read timed out. (read timeout=10)

These situations seems to work properly before, and we have nothing changed to the code. In de release notes I read about some changes to the SCIA binding. Is there something we have missed here?

Hi Bart,

Thanks for posting on the forum. Looking at the error message this issue is not related to any SDK upgrade, but is likely caused by some bad connection. This could very well be a problem on our server-side. Weโ€™ll have a look into it. How often does this error occur compared to the times that it does work properly?

Hi Bas,
The SCIA binding is activated by pressing a button in the app. If the number of load combinations that have to be written to the xml is large, this error occurs (everytime, also on the different dev accounts). We can reproduce this error very consequently. If the number of combinations is small the error doesnโ€™t occur (never).
Before the SDK update this large number of combinations used to work properly.

There is currently a time-out error at 10 seconds. Does the process of generation take longer than 10 seconds? (It is possible that updates caused an input file generation of slightly shorter than 10 seconds to take a bit longer, raising the time-out error.)

Yes I think that the generation takes longer that 10 seconds. Can I increase this time-out?

No, this is an internal setting, an SDK upgrade is needed for this. I reported your issue.

@bart.vosslamber : i can see in our logging system that we experienced out-of-normal long response times, but these seems to be gone now. can you confirm if you still encounter the same problem?

@matthijs : still the same error. Given the time dislay in the terminal, the job ideed takes longer than 10 seconds:

try with error:

2021-10-05 13:17:00.324 INFO    : Job received - uid: 24445 - EntityType: RoadTrafficCombiCalculator - function: create_scia_file
2021-10-05 13:17:12.134 ERROR   : Exception is raised

11.8 seconds

try without error:

2021-10-05 13:15:31.629 INFO    : Job received - uid: 24440 - EntityType: RoadTrafficCombiCalculator - function: create_scia_file
2021-10-05 13:15:36.902 INFO    : External analysis not yet finished, waiting 1 seconds to retry...

5.3 sec

thanks, weโ€™re looking into it