zoukankan      html  css  js  c++  java
  • ShopEx点击菜单,提示内存溢出

    今天用户点击左侧菜单“家用电器”后,弹出如下错误提示:


    系统暂时发生错误,请回到首页重新访问


    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 192269 bytes) in /www/b2c/core/include/shopPage.php on line 203

    <{t}>查看所有错误<{/t}>

    <br />
    <b>Fatal error</b>:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 192269 bytes) in <b>/www/b2c/core/include/shopPage.php</b> on line <b>203</b><br />


    因为是新手,我先查看了服务器的内存使用情况:

    [root@orange3c ~]# free -l
                 total       used       free     shared    buffers     cached
    Mem:      16429380    6082864   10346516          0     123724    4647224
    Low:      16429380    6082864   10346516
    High:            0          0          0
    -/+ buffers/cache:    1311916   15117464
    Swap:     18481144          0   18481144

    还有10G的free空闲。

    然后检查nginx,mysql的配置文件,感觉没有问题。

    继续看php的配置文件。

    先找到/usr/local/Zend/etc/php.ini 文件,里头的memory_limit = 128M,应该没什么问题。

    后来在网上搜索到http://bbs.shopex.cn/read.php?tid-152039.html,也发现这个分类下的商品很多,我就打开/www/b2c/config/config.php文件,确实发现

    @ini_set('memory_limit','32M');

    后改成

    @ini_set('memory_limit','256M');

    返回网站页面,能正常显示了。

  • 相关阅读:
    Python生成验证码
    Django设置
    OpenStack安装后检查流程总结
    利用src.rpm包修改源码后重新制作rpm包
    Python知识点:distutils常用子模块
    libvirt, libvirt-python, libvirtd 关系浅析
    Python知识点: os.popen
    Python知识点: __import__
    修改initrd.img里ko文件的一个小tips
    关于openstack自动化安装的一点思考
  • 原文地址:https://www.cnblogs.com/benio/p/1783853.html
Copyright © 2011-2022 走看看