摘要:
linux centos 如何设置swap大小?
swap的值都是安装系统的时候设置好的,一般设置为内存的两倍大小。使用过程中发现swap值过小只能添加。
用free -m 命令查看当前swap大小
使用下面的命令创建2G的空间
dd if=/dev/zero of=/var/swap bs=1024 count=2048000
if 表示infile,of表示outfile,bs=1024代表增加的模块大小,count=2048000代表2048000个模块,也就是2G空间 阅读全文
摘要:
php的Allowed memory size of 134217728 bytes exhausted问题解决办法
报错: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 128 bytes) in xxxx/mysqli_result.php on line 183
解决方案1:通过ini_set函数修改配置选项值,ini_set(‘memory_limit’,’256M’); //升级为256M内存
解决方案2:1、修改php.ini
修改php配置
vi /usr/local/php/etc/php.ini
memory_limit = 128 改成memory_limit = 256
php-fpm重启
/etc/init.d/php-fpm restart
重启Nginx
service nginx restart 阅读全文