知更鸟begin模板,进WP后台显示500错误,页面空白的解决办法
折腾了一天一夜终于知道答案:
打开wp-config.php的调试模式define('WP_DEBUG', true);,在打开后台,在最底部就会出现这个错误。
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 9 bytes) in /home/wwwroot/t22.com/wp-includes/wp-db.php on line 1438
解决:
Add this to your wp-config.php file:
define ('WP_MEMORY_LIMIT', '512M' );
在你的 wp-config.php 文件中加上红色的那行字
方法2:wp-settings.php,编辑这个文件,修改define('WP_MEMORY_LIMIT', '32M');
为
define('WP_MEMORY_LIMIT', '512M');
方法3:
直接修改/usr/local/php/etc/php.ini
里面的memory_limit为256M,原值为128M
另外一个错误:
Notice: MemcachePool::add(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: SERVER_ERROR object too large for cache (3) in /home/wwwroot/ttttt/wp-content/object-cache.php on line 121
vi /etc/rc.d/init.d/memcached
IP=127.0.0.1
PORT=11211
USER=root
MAXCONN=4096
CACHESIZE=1024
MAXITEMSIZE=5m
OPTIONS=""
增加红色一行
在后面修改:
/usr/local/memcached/bin/memcached -d -l $IP -p $PORT -u $USER -I $MAXITEMSIZE-m $CACHESIZE -c $MAXCONN -P /var/run/memcached.pid $OPTIONS
service memcached restart
重启memcached
有个warning,不用理会,默认是1m的意思
原文出处。http://www.alphadevx.com/a/387-Changing-the-maximum-item-size-allowed-by-Memcache
评论已关闭