Skip to content
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

Document reasoning for having maxsyncaccounts #184

Open
xaverdh opened this issue Feb 19, 2024 · 1 comment
Open

Document reasoning for having maxsyncaccounts #184

xaverdh opened this issue Feb 19, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@xaverdh
Copy link

xaverdh commented Feb 19, 2024

What is the reasoning for having maxsyncaccounts and why is it encouraged to not use this? for security reasons?

@thekix
Copy link
Member

thekix commented Aug 17, 2024

Hi @xaverdh

It is related to the number of threads used. See this code in offlineimap/threadutil.py, line 183:

def initInstanceLimit(limitNamespace, instancemax):
    """Initialize the instance-limited thread implementation.

    Run up to intancemax threads for the given limitNamespace. This allows to
    honor maxsyncaccounts and maxconnections."""

    global limitedNamespaces

    if limitNamespace not in limitedNamespaces:
        limitedNamespaces[limitNamespace] = BoundedSemaphore(instancemax)
The value of `instancemax` is the value of `maxsyncaccounts`, see `init.py`, line 362:

        threadutil.initInstanceLimit(
            ACCOUNT_LIMITED_THREAD_NAME,
            config.getdefaultint('general', 'maxsyncaccounts', 1)
        )

I hope this helps. If the answer is ok for you, please, close the issue. If you need more info, do not hesitate to ask.

Best regards,
kix.

@thekix thekix added documentation Improvements or additions to documentation question Further information is requested labels Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants