MySQL Forums
Forum List  »  Connector/Python

Re: mysql-connector-python starting from 8.0.12 goes to infinite loop when iterates till the end of table
Posted by: Alexey Chernov
Date: May 02, 2020 10:48PM

> Does this also happen in the mysql client program?
No, `SELECT * FROM KLB1` and other queries that I tried work fine and fast in the mysql client.

> How many rows in klb1?
223

> What storage engine?
InnoDB 10

> Have you run Check Table on it?
Just checked, status is OK

> If it's InnoDB, what is innodb_buffer_pool_size
134217728

> and what does Show Engine Innodb Status say whilst the query is hanging?
I believe that the query itself completes immediately, and then the infinite loop is inside python only.

```2020-05-03 07:45:28 0x7fd528147700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 46 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 11 srv_active, 0 srv_shutdown, 173720 srv_idle
srv_master_thread log flush and writes: 0
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 21
OS WAIT ARRAY INFO: signal count 22
RW-shared spins 4, rounds 4, OS waits 0
RW-excl spins 67, rounds 644, OS waits 6
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 1.00 RW-shared, 9.61 RW-excl, 0.00 RW-sx
------------
TRANSACTIONS
------------
Trx id counter 96557
Purge done for trx's n:o < 96557 undo n:o < 0 state: running but idle
History list length 35
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 422029023947344, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422029023948208, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422029023946480, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
3018 OS file reads, 3172 OS file writes, 1165 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 2636, seg size 2638, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 3 buffer(s)
Hash table size 34679, node heap has 6 buffer(s)
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 2 buffer(s)
Hash table size 34679, node heap has 4 buffer(s)
Hash table size 34679, node heap has 7 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 15736829680
Log buffer assigned up to 15736829680
Log buffer completed up to 15736829680
Log written up to 15736829680
Log flushed up to 15736829680
Added dirty pages up to 15736829680
Pages flushed up to 15736829680
Last checkpoint at 15736829680
2080 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 137363456
Dictionary memory allocated 2080803
Buffer pool size 8192
Free buffers 4815
Database pages 3349
Old database pages 1256
Modified db pages 0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 2, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 2959, created 390, written 925
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 3349, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=17035, Main thread ID=140553539753728 , state=sleeping
Number of rows inserted 900, updated 2153, deleted 508, read 97741
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
```

> How much RAM are you running in?
2GB RAM + 2GB swap file

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.