求助:ECSHOP数据承载异常

2016-07-07 15:37 来源:www.chinab4c.com 作者:ecshop专家



我用自己写的程序将原来商城数据库导入现在的ECSHOP2.7里面,整整花了我两天时间,一共导入15000条商品,130个商品分类,刚进去所有信息均正常显示,欣喜若狂,修改一条数据后,程序居然执行超时,

代码如下:
  1. Fatal error:Maximum execution time of 30 seconds exceeded in F:\WEB\includes\lib_common.php on line 396
复制代码
还以为数据出问题了,或者PHP有问题,于是马上写了段PHP查询程序,输出正常,15000条所有信息列出,无异常,执行时间0.13秒

奇怪了ECSHOP怎么就执行超时了呢?足足30秒啊!很诧异,PHP不算精通,求官方大侠们给个解决办法或者给个理由!

回答:
顶下 对PHP和你一样不太懂

现在所有涉及分类和商品的两个表的文件 全部执行超时,除后台其他表可以正常操作外,均不能执行

延长执行时间看下

版主、管理员来看看吧!

试过了,延长到1分钟都不动!

各位来帮忙看看,感激不尽

那么查看下sql运行记录,看下哪个sql语句执行时间特别长

17 Connectroot@localhost on
17 Query SET character_set_connection=gbk, character_set_results=gbk, character_set_client=binary
17 Query SET sql_mode=''
17 Query SHOW VARIABLES LIKE 'basedir'
17 Query SELECT UNIX_TIMESTAMP() AS timeline, UNIX_TIMESTAMP('2009-09-08 09:05:04') AS timezone
17 Init DBtrgo
17 Query SELECT userid, adminid, user_name, user_rank, discount, email, data, expiry FROM `trgo`.`txshow_sessions` WHERE sesskey = '3536d0cb83cdf4e1bb09756263d313f5'
090908 17:06:04 17 Query UPDATE `trgo`.`txshow_sessions` SET expiry = '1252400764', ip = '127.0.0.1', userid = '0', adminid = '1', user_name='0', user_rank='0', discount='0', email='0', data = 'a:4:{s:12:\"captcha_word\";s:16:\"NWU2NmZlOWJlNQ==\";s:10:\"admin_name\";s:6:\"谢欣霖\";s:11:\"action_list\";s:3:\"all\";s:10:\"last_check\";i:1252400422;}' WHERE sesskey = '3536d0cb83cdf4e1bb09756263d313f5' LIMIT 1
17 Query DELETE FROM `trgo`.`txshow_sessions` WHERE expiry < 1252398964
17 Quit

就这个执行了120秒

但是里面并没有和商品有关系的东西啊,我怀疑没有执行,所以日志并没有记录,只验证了管理员信息

这个里面没有时间
请发一份,运行记录


  1. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_new = 1 AND is_real = 1
  2. 10 Quit
  3. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_new = 1 AND is_real=0 AND extension_code='virtual_card'
  4. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_best = 1 AND is_real = 1

  5. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_best = 1 AND is_real=0 AND extension_code='virtual_card'
  6. 13 Query SELECT code, value
  7. FROM `trgo`.`txshow_shop_config`
  8. WHERE code IN ('certificate_id', 'token', 'certi')
  9. LIMIT 0,3
  10. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_hot = 1 AND is_real = 1
  11. 13 Query SELECT code, value
  12. FROM `trgo`.`txshow_shop_config`
  13. WHERE code IN ('certificate_id', 'token', 'certi')
  14. LIMIT 0,3
  15. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND is_hot = 1 AND is_real=0 AND extension_code='virtual_card'
  16. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND promote_price>0 AND promote_start_date <= '1252401714' AND promote_end_date >= '1252401714' AND is_real = 1
  17. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND promote_price>0 AND promote_start_date <= '1252401714' AND promote_end_date >= '1252401714' AND is_real=0 AND extension_code='virtual_card'
  18. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND goods_number <= warn_number AND is_real = 1
  19. 9 Query SELECT COUNT(*) FROM `trgo`.`txshow_goods` WHERE is_delete = 0 AND goods_number <= warn_number AND is_real=0 AND extension_code='virtual_card'
复制代码
我把记录清空,然后执行了一次商品查询,我把商品表的日志挑出来,你看看

http://www.famioo.cn/index.php?M ... =80518&bid=1172
mysql这样设置下,查看下哪些sql语句执行速度特别慢
这个里面并未记录执行时间

兄弟伙些啊,来帮忙看看撒!