-
Notifications
You must be signed in to change notification settings - Fork 255
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
packet sequence number wrong #614
Comments
I'm also seeing this after the connection being idle for some time.
|
Looks like this problem exists in pymysql |
I'm also having the same problem. Here's my Python traceback.
|
def create_pool(minsize=1, maxsize=10, echo=False, pool_recycle=-1, loop=None, **kwargs): use param pool_recycle will deal some questions; |
Maybe it's caused by multithread or coroutine. PyMySQL issue 422 Because only Then remove the connection pool, using a single persistent connection instead and add a lock when a function want to execute a sql statement. like this ↓ async def execute(self, sql: str):
async with self.lock:
async with self.connection.cursor() as cur:
await cur.execute(sql)
last_id = cur.lastrowid
await self.connection.commit()
return last_id After 2 days testing, it works correctly. But I still want to use a connection pool, so I create and manage a pool on my own using asyncio.Queue. |
Hi, which database and database version are you seeing this on? |
i use aiomysql pool.
here is my usage.
when i need query sql, pool.acquire first , query done, i close cur and release conn. there is 2~4 coroutine use like this.
is there any chance to have this problem --- packet sequence number wrong?
The text was updated successfully, but these errors were encountered: