raksmart活动促销

分享

写回答

发帖

[提问] limits on mySQL

HostMonster HostMonster 12031 人阅读 | 23 人回复

发表于 2010-3-16 15:39:32 | 显示全部楼层 |阅读模式

我用的prestorshop开源购物车系统。
在后台修改产品,保存里提示: mySQL several has gone away.

进入主机数据库执行SQL查询:
SELECT pa.*, ag.`id_attribute_group`, ag.`is_color_group`, agl.`name` AS group_name, al.`name` AS attribute_name, a.`id_attribute` FROM `ps_product_attribute` pa LEFT JOIN `ps_product_attribute_combination` pac ON pac.`id_product_attribute` = pa.`id_product_attribute` LEFT JOIN `ps_attribute` a ON a.`id_attribute` = pac.`id_attribute` LEFT JOIN `ps_attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group` LEFT JOIN `ps_attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = 1) LEFT JOIN `ps_attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = 1) WHERE pa.`id_product` = 681 ORDER BY pa.`id_product_attribute`

出现以下提示:
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay

不知道是哪有问题了,请高手指点,谢谢啦!

回答|共 23 个

一路同行

发表于 2010-3-16 15:50:03 | 显示全部楼层

是不是你操作太频繁了

dmsss

发表于 2010-3-16 16:04:23 | 显示全部楼层

有可能,最近是两个个同时在后台修改产品。这个也会导治这样的问题吗?刚联系在线客服:
Coral: [11:41:51 PM] Hi, mySQL seems to large. When I do the seach, it shows me: The SELECT would ex amine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay How to work it please?
Anthony: [11:42:54 PM] adjust your query to meet the limits set on mysql
[11:44:02 PM] As we are kept busy while providing live chat support I am not able to leave this session open indefinetely. There are other people waiting for support that I must provide assistance to as well, please feel free to open a new chat session when you are prepared t o promptly address the problem you need support for.
客服就关掉对话了。

我再开对话问:
How to adjust the limits on mysql
他答:no way
就再让我提交ticket去问了……

怎么解决?我的数据库下载下来有160M的样子。

谢谢版版。

一路同行

发表于 2010-3-16 16:14:19 | 显示全部楼层

应该是你操作太过频繁,导致数据库性能上的问题
稍后再试试看吧

dmsss

发表于 2010-3-16 16:28:32 | 显示全部楼层

昨天出的错,今天试了一下,还是不行…… 就是不能保存编辑过的产品,但在后台可以删除产品。

一路同行

发表于 2010-3-16 16:44:16 | 显示全部楼层

你试试修改php.ini文件里的mysql.connect_timeout 参数看看行不行

dmsss

发表于 2010-3-16 18:36:35 | 显示全部楼层

不明白……我同事说这个我们自己改不了,是HM来改?
是在主机的CP里能找到php.ini文件吗?

一路同行

发表于 2010-3-17 10:02:35 | 显示全部楼层

本来在my.ini文件里可以修改,但这个文件我们是没有权限的
所以我让你尝试在php.ini文件里修改
如果你的根目录下面没有php.ini文件,可以到php config里生成一个,生成之后的文件叫php.ini.default,你把文件名改成php.ini就行了

dmsss

发表于 2010-3-17 11:55:42 | 显示全部楼层

还是不行……

版主帮帮我

dmsss

发表于 2010-3-17 12:05:43 | 显示全部楼层

现在的php.ini里的设置是这样的:
; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = -1

; Connect timeout
;mssql.connect_timeout = 5

是不是改得不对?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

HostMonster讨论

HostMonster
优惠码:优惠链接
介绍:HostMonster美国主机商成立于1996年,总部位于犹他州普罗沃,提供主机托管服务,在业内有比较有实力,而且口碑也不错。HostMonster美国主机性价比较高,而且基本不会额外收取费用,其无限型方案支持无限磁盘空间,无限带宽和电子邮件帐户,提供免费域名1个。
查看更多

dmsss

发表主题