calling `executemany` async concurrently leads to "Segamentation fault"
zpz opened this issue · 2 comments
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.
For MySQL you may have better luck using aiomysql.
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