Laravel artisan script memory size

In my application (Laravel 5.1) I have different commands which are quite simple:

  • Get ip from RabbitMQ
  • Trying to establish a connection with this ip
  • Update a record in the database

Since it will take some time to connect to ip (up to 30 seconds). I am forced to run multiple instances of this script. For this I created console commands that are run by systemd.

As soon as I went into production, I was very surprised at the amount of memory these scripts consumed. Each script (as reported by memory_get_usage ) used about 21MB at startup. Considering that ideally I would need to run about 50-70 in these scenarios, at the same time this is a big problem for me.

As a test, I installed a clean Laravel 5.1 project and ran its default command artisan inspire

, php 19mb reports.

Is this normal for laravel or am I missing something important here?

+3
memory-management php console laravel


source to share


No one has answered this question yet

Check out similar questions:

951
Can a local memory variable be accessed outside of its scope?
792
Returning JSON from PHP script
772
How can I find out the memory usage of my application in Android?
581
What is the recommended Python memory profiler?
459
Tricks for managing available memory in an R session
375
Laravel requires the Mcrypt PHP extension
4
Running Laravel / Symfony / Artisan command in the background
2
Laravel Forge Long Running Artisan Command with daemon
1
Calling PHPUnit from the Artisan command will ignore the XML file
1
I assure you there is always one instance of PHP Laravel script



All Articles
Loading...
X
Show
Funny
Dev
Pics