问题
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?).
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.
What Im Using
- Ubuntu Linux Xenial x64 (Local Development)
- Apache2.4
- MySQL 5.7
- PHP 7.0.15
- Laravel 5.4
- Composer 1.3.2
PHP Extensions Loaded
[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
Things I've Tried:
- Removed the bootstrap/cache/config.php file.
composer dumpautoload
composer self-update
- The Artisan commands don't work below
php artisan clear-compiled
php artisan optimize
php artisan optimize --force
My Guess I'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.
Thank you!
回答1:
It's missing ::class I had the same problem, just like you, one little mistake.
回答2:
Did a new installation, and this is causing it:
config.php/app
$providers => [
...
Laravel\Cashier\CashierServiceProvider
...
]
from https://laravel.com/docs/5.4/billing
I'm not sure why this is causing it. I have followed the instructions with no implementation (I cannot migrate without artisan running either. This is odd but fixes it for now.
来源:https://stackoverflow.com/questions/42599247/laravel-artisan-hangs-using-memory-until-freeze