总是被import ssl
import certifi
urlopen(request, context=ssl.create_default_context(cafile=certifi.where()))
阻塞在简单的插入sql打击中,它可以在15分钟后成功执行,但是为什么要花这么长时间呢?
查询和表模式如下:
STATE: update
mysql> SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where info like '%4fun%' \G
*************************** 1. row ***************************
ID: 26394242
USER: vtube
HOST: 10.75.64.65:58622
DB: vtubemeta
COMMAND: Query
TIME: 0
STATE: executing
INFO: SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where info like '%4fun%'
*************************** 2. row ***************************
ID: 26449261
USER: vtube
HOST: 10.75.64.65:56658
DB: vtubemeta
COMMAND: Query
TIME: 150
STATE: update
INFO: insert into spider_4fun_video_meta
(`poster_id`,`pubtime`,`country`,`play_cnt`,`share_cnt`,`comment_cnt`,`like_cnt`,`vid`,`msg_txt`,`app_name`,`status`)
values('39CCE0695EB495B4',1556715312,'IN',2592,72,4,122,'22729715','','4fun',0)
ON DUPLICATE KEY UPDATE
play_cnt=Values(play_cnt),
share_cnt=Values(share_cnt),
comment_cnt=Values(comment_cnt),
like_cnt=Values(like_cnt),
msg_txt=Values(msg_txt)
2 rows in set (0.00 sec)
=================
它可以平稳地执行“类似插入”操作5分钟(可能执行300次),并且像上面的查询一样陷入一个单一的线程。