You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @jborean93, first I appreciate you created this awesome library!
I find out that after around 10 - 15 minutes every time I created a session with smbclient.register_session to the same server, the next session takes like 1 minutes to create. In average it only takes 1~2 seconds.
The server we are using is AWS FSx Windows Server, and I close the connection everytime I finish the job. I think I understand how you implement the cache. However I am not running a long running script. I am like run a python script then go, and run another one (they all have some SMBclient read / write logic). I don't think the cache are used between different python script.py. Also I don't think there would be lots of open connection on the server side since I close those connection after the work.
Any Idea how it happens? Thank you again for this awesome library.
ses=smbclient.register_session(...)
# do somethingses.connection.disconnect()
The text was updated successfully, but these errors were encountered:
Sorry for the delay in the reply. I'm unsure as to why this is happening. It sounds like it might be trying to close down the existing connection that might be broken and causing a long time to disconnect. If you are calling ses.connection.disconnect() it will be manually disconnecting the connection but the pool doesn't have any idea that has happened so it fails to remove it from the pool. The next subsequent connection will attempt to revive the connection.
I'll have to find some time to try and play around with it some more and see if I can reproduce the problem. For now I would recommend avoiding manually disconnecting the connection through the session object. If you wish to do it then disconnect the entire pool through smbclient.reset_connection_cache().
Hi @jborean93, first I appreciate you created this awesome library!
I find out that after around 10 - 15 minutes every time I created a session with
smbclient.register_session
to the same server, the next session takes like 1 minutes to create. In average it only takes 1~2 seconds.The server we are using is AWS FSx Windows Server, and I close the connection everytime I finish the job. I think I understand how you implement the cache. However I am not running a long running script. I am like run a python script then go, and run another one (they all have some SMBclient read / write logic). I don't think the cache are used between different
python script.py
. Also I don't think there would be lots of open connection on the server side since I close those connection after the work.Any Idea how it happens? Thank you again for this awesome library.
The text was updated successfully, but these errors were encountered: