-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session crashes when setting "connection_timeout" too high #263
Comments
Should this be something that is fixed in iBridges though? I suppose we can at least update the readthedocs, but otherwise shouldn't this be handled in the PRC? The only thing we do is change the default timeout, which does not give an error. |
@d-w-moore do we need to add a too large, but not infinite, number to this test? |
We should certainly add the info to the FAQ which number translates to which timeframe and that the maximum number is the number of seconds of 292 years :) |
@chStaiger I see that a new branch was created, are you making the adjustments? |
Probably ... what I wonder is - what should be our goal here for the PRC. The error-dump below shows me that the blow-up occurs in the lower-level socket code. Should PRC become a gatekeeper for this case and artificially limit the value. If so, we chould have an 'Infinite' or LARGEST_CONNECTION_TIMEOUT constant as a hard-limit, and/or additionally document it in the README
|
Testing looks dicey but only because of the Python lib's inconsistency in types of error thrown:
gives:
|
Can’t we just catch both in PRC? Is that weird / confusing? |
We can do that. It was just confusing that the type of Error depends on the amount by which we exceeded the threshold |
Agreed. But, seems well behaved enough for us to react consistently and protect our PRC users (hi!). |
note comments at the top of 3.12... https://github.com/python/cpython/blob/3.12/Include/cpython/pytime.h are gone in 3.13... https://github.com/python/cpython/blob/3.13/Include/cpython/pytime.h with more words now at https://github.com/python/cpython/blob/3.13/Doc/c-api/time.rst |
also, just for the record... clamping our PRC session timeout to 292 years seems... sufficient :) |
Yes, I will update the doc and will insert some error catching. |
I propose that we don't do any error catching for now. After we update the docs, almost no one should run into the issue. |
Yes, I just threw a warning and corrected the number. PR will follow asap. |
Even that I wouldn't do, especially if it going to get handled in the PRC or future versions of CPython. We could make another item in the FAQ? |
linked to chStaiger/iBridges-Gui#266
Maximum for "connection_timeout" in irods_environment.json is 9208512000 which translates to 292 years.
Add extra check and catching of
OverflowError: timestamp too large to convert to C _PyTime_t
when session is created.Maybe we can also give the hint in the docs and in the error catching that 1 week corresponds to 604800 seconds.
The text was updated successfully, but these errors were encountered: