【发布时间】:2014-03-07 04:15:40
【问题描述】:
我收到来自 Magento 的 Too many connections 错误。
我已将max_connection 增加到 1000,但我仍然收到错误消息。
我联系了托管服务提供商,他们让我使用命令 show processlist; 并检查我的编码。
当我运行命令时,我只看到很少的活动连接(大约 4 到 5 个连接)。因此,我不知道如何解决这个问题。
我已将 max_connection 增加到 1500,我现在收到 create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug 错误。
谁能帮我解决这种情况? 我很感激你的帮助和时间。
这是我的.cnf
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 1024
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 16
query_cache_type = 1
query_cache_size = 48M
log_slow_queries=/var/log/mysqld.slowquery.log
max_connections=1000
wait_timeout=120
tmp_table_size = 64M
max_heap_table_size = 64M
innodb_buffer_pool_size = 2048M
innodb_additional_mem_pool_size = 20M
open_files_limit=34484
#
这是显示进程列表
+-------+-----------+-----------+--------------------+----------------+-------+--------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+-----------+-----------+--------------------+----------------+-------+--------------------+------------------+
| 4729 | root | localhost | abc_def| Sleep | 13093 | | NULL |
| 16282 | eximstats | localhost | eximstats | Sleep | 84 | | NULL |
| 16283 | DELAYED | localhost | eximstats | Delayed insert | 84 | Waiting for INSERT | |
| 16343 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+-------+-----------+-----------+--------------------+----------------+-------+--------------------+------------------+
4 rows in set (0.00 sec)
【问题讨论】:
-
只是一个不值得真正回答的建议——切换到像 Nexcess 这样的 Magento 感知主机。 Magento 的性能配置文件超出了标准共享托管服务提供商的服务器设置的正常范围。
-
可能是您的服务器无法运行 Magento。因此,只需使用具有良好配置的专用服务器..
标签: mysql magento connection