Laravel内存问题? [英] Laravel Memory Issue?

查看:197
本文介绍了Laravel内存问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人

我正面临在DO服务器上遇到这样的问题,我已经尝试了一切,整个网站都在使用Homestead的linux服务器上正常工作了100%,但是在上载后,它只能工作一次,在重新加载或刷新页面后会掉很多次。
-我试图增加apache服务器的内存
-我也尝试跟踪laravel.log,但没有任何问题。
-除作曲家clear-cache + php artisan缓存外,我还删除了configure.php:clear + php artisan优化但没有用。

i am facing such problem on DO server, i have tried everything , the whole site is working 100% properly on linux server using Homestead but after uploading it , it works for one time , going down many times after reloading or refreshing the page . - i tried to increase the memory of the apache server - i also tried to track the laravel.log but no any issues. - i also deleted the compiled.php in addition of composer clear-cache + php artisan cache:clear + php artisan optimize but no use.

任何想法?我会非常感激。
预先谢谢您。

any ideas ? i would be so thankful. thank you in advance.

推荐答案

您的Droplet内存不足。创建一个交换文件来解决此问题。

Your droplet is running out of memory. Create a swap file to fix this issue.

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

参考: DigitalOcean

这篇关于Laravel内存问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆