Timeouts and retry intervals

Hi there!

We encounter regular hangs when doing queries to shotgun. Those hangs are not systematic but appear relatively frequently.

While doing my research, I could figure out that ssl is waiting for an answer and nothing happens for a while. For test reasons, we did wait to see if something happens at some point. And indeed, we had cases where we got the results and the tools continue to run as expected, it only took hours or entire nights to get the result.

I’m not sure if there is anything in-house configuration that could have an effect on this matter or if I could change this behavior by tweaking the retry times and timeout duration that are set in the shotgun config class.

I see that 3000 milliseconds is the default for the automatic retry time and nothing is set for the httplib2 timeout duration. I’m just playing around with different values to see what impact that has on our tools. I used multiple values and went down to ridiculus values like 10 milliseconds for the retry time and 0.05 timeout duration. But I could not see any effect on the behavior on our tools. With such small values, I would expect more retries and errors due to too long response time at some point, or our connection to shotgun is incredibly fast. :slight_smile:

Can anyone give me some hints about those configurations and do you already have played around with different values and for what reason and with what effect?

Thanks for any input.

Greets,
Carlo

Hi Carlo :)!

Patrick gave some in insight on this question in this thread.

Cheers,
Alex

Hi Alex (long time no see!)!

Thanks for the hint. But after having read through it, if I do not misunderstand it, this thread is talking about events handled by the daemon. So far, we are not (yet) using shotgun events in our tools. So I guess that we have to look at a different spot.

But this was also a more general question about the two options in the Config object ‘rpc_attempt_interval’ and ‘timeout_secs’. I have the impression that they do not have any effect on the behavior of the shotgun api.

Do other studios use custom values or are the default ones the most useful ones?

I saw as well that there is a script to update httplib. But I’m wondering if this is something that ‘can’ be done, or ‘should’ be done? And what would be the reasons to do so. Might this have an impact on our specific problem?

I’m sorry if those questions might be obvious, but I’m really not an expert in http, protocols and internet communication in general.

Greets,
Carlo