MySQL Common Error

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

  1. 查看数据的 timeout 设置 show global variables like ‘wait_timeout’

    1
    2
    # 3600 sec = 60 min
    wait_timeout 3600
  2. druid

    https://www.cnblogs.com/wangiqngpei557/p/10291606.html


‘Operation aborted: Failed to acquire lock due to max_num_locks limit’ from ROCKSDB

1
2
3
4
5
show global variables like 'rocksdb_max_row_locks'

# set global rocksdb_max_row_locks=2000000;

set session rocksdb_max_row_locks=2000000;

ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

mysql的varchar主键只支持不超过767个字节或者768/2=384个双字节 或者767/3=255个三字节的字段 而GBK是双字节的,UTF8是三字节的。

https://cloud.tencent.com/developer/article/1005696


Reference