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


source to share





All Articles