Skip to content

Commit

Permalink
Merge pull request #56 from nylas/jhatch28/increase-session-poolsize
Browse files Browse the repository at this point in the history
Increase session pool size to 500
  • Loading branch information
jhatch28 authored Nov 17, 2020
2 parents c91dfc6 + 94164fa commit 1d1e9c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exchangelib/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ class BaseProtocol(object):
# The maximum number of sessions (== TCP connections, see below) we will open to this service endpoint. Keep this
# low unless you have an agreement with the Exchange admin on the receiving end to hammer the server and
# rate-limiting policies have been disabled for the connecting user.
SESSION_POOLSIZE = 4
# This pool is shared across all accounts that are using the same service account in a single
# process, so we need it to be high enough that our greenlets aren't blocking waiting for a session.
# Since we manage our own connections well, we don't need to worry about exchangelib throttling
# our connections for us.
SESSION_POOLSIZE = 500
# We want only 1 TCP connection per Session object. We may have lots of different credentials hitting the server and
# each credential needs its own session (NTLM auth will only send credentials once and then secure the connection,
# so a connection can only handle requests for one credential). Having multiple connections ser Session could
Expand Down

0 comments on commit 1d1e9c4

Please sign in to comment.