[ https://issues.apache.org/jira/browse/BEAM-7616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913549#comment-16913549 ]
Udi Meiri commented on BEAM-7616: --------------------------------- Monkey patching seems like a bad idea. Calling {code}socket.setdefaulttimeout(60){code} seems like a good idea, but where? Putting the call in apache_beam/__init__.py seems to work, even if you only import sub-modules of apache_beam. An issue could arise with save_main_session, since the defaulttimeout value (https://github.com/python/cpython/blob/d0da97de65985ea4fc69cade2343d931f8b9efcd/Modules/socketmodule.c#L6440-L6447) is set in a CPython module and hence not picklable? We can try an experiment with the __init__.py solution and add a log message there to see if the file gets run on remote workers. > urlopen calls could get stuck without a timeout > ----------------------------------------------- > > Key: BEAM-7616 > URL: https://issues.apache.org/jira/browse/BEAM-7616 > Project: Beam > Issue Type: Bug > Components: sdk-py-core > Reporter: Ahmet Altay > Assignee: Udi Meiri > Priority: Blocker > Fix For: 2.14.0, 2.16.0 > > Time Spent: 2h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.2#803003)