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

calling executemany async concurrently leads to "Segamentation fault" #243

Open
zpz opened this issue Feb 18, 2020 · 2 comments
Open

calling executemany async concurrently leads to "Segamentation fault" #243

zpz opened this issue Feb 18, 2020 · 2 comments

Comments

@zpz
Copy link

zpz commented Feb 18, 2020

I'm using aioodbc to talk to MySQL. executemany works for me in inserting many rows into a table. Hoping to increase throughput, I tried to async call executemany concurrently like this:

async for x in data:
    task = asyncio.ensure_future(cursor.executemany(...))
    await queue.put(task)

The queue has capacity 10. This leads to Segmentation fault w/o any additional info. I guess this has to do with the interaction between async and threads, but don't know for sure. Any idea why this is happening? Thanks.

@gordthompson
Copy link

For MySQL you may have better luck using aiomysql.

@WilliamStam
Copy link

For MySQL you may have better luck using aiomysql.

this is a total resurrection of the old. i had that segmentation fault as well with mysql and tried a ton of differnet libraries. as soon as you increase the amount of data then they all seem to fail regardless.

(soz i dont have anything more constructive to say on the topic) for speed try asyncmy

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