问题描述
使用Laravel 5.4,Artisan将无法运行并占用大量内存,并且在使用相同版本(可能是PHP 7.0.14到7.0.15之外)的情况下工作了很长时间.
With Laravel 5.4 Artisan will not run and uses a lot of memory, it worked a long while before with the same versions (besides PHP 7.0.14 to 7.0.15 maybe?).
问题:任何$ ./artistan
命令均不执行任何操作.在观看htop
时,我注意到内存从2gb
到4gb
的爬升非常快.一旦我取消它,它就会跳回来.
Problem: any $ ./artistan
command does nothing. While watching htop
I notice the memory climb from 2gb
to 4gb
very quickly. Once I cancel it, it jumps back down.
我正在使用什么
- Ubuntu Linux Xenial x64(本地开发)
- Apache2.4
- MySQL 5.7
- PHP 7.0.15
- Laravel 5.4
- 作曲者1.3.2
- Ubuntu Linux Xenial x64 (Local Development)
- Apache2.4
- MySQL 5.7
- PHP 7.0.15
- Laravel 5.4
- Composer 1.3.2
已加载PHP扩展
[PHP Modules] bz2 Core ctype curl date dom exif fileinfo filter gd gettext hash iconv igbinary imap intl json libxml mbstring mcrypt mysqli mysqlnd odbc openssl pcntl pcre PDO pdo_mysql PDO_ODBC Phar posix readline redis Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache
我尝试过的事情:
- 删除了bootstrap/cache/config.php文件.
-
composer dumpautoload
-
composer self-update
- Removed the bootstrap/cache/config.php file.
composer dumpautoload
composer self-update
-
php artisan clear-compiled
-
php artisan optimize
-
php artisan optimize --force
php artisan clear-compiled
php artisan optimize
php artisan optimize --force
我的猜测我猜我已经启用了PHP扩展,导致了问题,但我不知道哪个-如果您有任何想法或线索,请告诉我.
My GuessI'm guessing I have a PHP extension enabled causing the problem but I wouldn't know which -- Please let me know if you have any ideas or clues.
谢谢!
推荐答案
它丢失了:: class我也遇到了同样的问题,就像你一样,一个小错误.
It's missing ::class I had the same problem, just like you, one little mistake.
这篇关于Laravel Artisan使用Memory挂起,直到冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
-