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

Getting pymongo.errors.ExecutionTimeout for using more than 1 instance of AsyncMinHashLSH #187

Open
RonaldRegan69 opened this issue Jun 6, 2022 · 3 comments

Comments

@RonaldRegan69
Copy link

I have a use case where i have to store min hash of (n) different categories of file and the query them.
For example if i have documents of category A and I want to store all of them in one db and then query at later point.

I am initializing this in a microservice as (fastapi) as follows

@app.on_event("startup")
async def startup_event():
    LSHService.lsh_js, LSHService.lsh_css, LSHService.lsh_html, = await asyncio.gather(
        *[
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-a".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-b".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-b".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
        ]
    )

If i initialize like this i get
Getting pymongo.errors.ExecutionTimeout Error

However If i just maintain 1 object then I dont get any error.

What can I do mitigate this?
Thanks in advance

@ekzhu
Copy link
Owner

ekzhu commented Jun 7, 2022

Not an expert in async. @aastafiev would you be able to take a look?

@RonaldRegan69
Copy link
Author

any update over this?

@aastafiev
Copy link
Contributor

aastafiev commented Jun 13, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants