【问题标题】:Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size为临时表分配的内存大小超过 innodb_buffer_pool_size 的 20%
【发布时间】:2021-10-01 13:05:24
【问题描述】:

我在 mysql 中遇到问题,结果我的 mgento 2 网站总是崩溃。请查看此错误。我该如何解决这个问题。网站托管在 AWS 中。

[2021-07-19 15:42:32] main.ERROR: SQLSTATE[08004] [1040] Too many connections [] []
[2021-07-19 15:42:34] main.ERROR: SQLSTATE[08004] [1040] Too many connections [] []
[2021-07-19 15:42:54] main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 500000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] []
[2021-07-19 15:43:05] main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 100000; Allocated memory size: 500000000 bytes; InnoDB buffer pool size: 134217728 bytes. [] [] 

【问题讨论】:

  • 你有多少备用内存? 128M 对于innodb_buffer_pool_size 来说太小了。

标签: mysql amazon-web-services magento innodb


【解决方案1】:

Magento 可以通过使用内存引擎而不是 InnoDB 来增加处理大量数据的内存。该算法增加了 max_heap_table_size 和 tmp_table_size MySQL 参数的内存值。

当为临时表分配的内存大小将大于 innodb_buffer_pool_size 的 20% 时,错误消息将写入 Magento 日志。

为防止出现此错误消息,您需要更新 catalog_category_product(类别产品)索引器的默认批处理配置,因为“当前批处理大小:100000”。

注意:减少 batchRowsCount 以解决错误。

【讨论】:

    猜你喜欢
    • 2019-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-28
    • 2018-10-22
    • 1970-01-01
    • 2017-04-07
    • 2012-03-05
    相关资源
    最近更新 更多