Because I get "out of memory" in Laravel queue

0

I am using Store :: put () to save images that come by post with psd, jpg and png extension from the controller.

With the png and jpg files there is no problem but I had to increase the memory of php.ini "memory_max .." to be able to execute these tasks (to get in the background).

Once solved, although it takes a long time to process the psd files, it works, (I hope to migrate the project to a more pontent machine, I am using a raspberry of 1GB ram).

When I change the system to use jobs and queue, it breaks, I send to the job the three images in base64 to write it from the job. At that moment the server collapses and sends error "Out of memory try to allocate x memory".

I have increased memory up to 1GB in:

post_max_size max_file_size memory_max

And on how I run the system, from the controller I receive data via psd post, jpg and png, I save them in variables, sent the variables to the job using dispatch, then from the job I make a Store :: put () .

The funny thing that does not get to print in the laravel.log some logs that I have before calling the dispatch, directly I return the data that I tried to save and could not, I mean the images.

Any idea why, if I do not use queue, can I save the information and use queues to make more use of resources?

    
asked by Albert Sanchez Guerrero 26.02.2018 в 11:35
source

0 answers