So I've this:
exec("cd $upload_directory && convert \\( +append -limit memory 1 -limit map 1 *.jpg \\) -strip -trim -interlace Plane -quality 60 output.jpg
The workflow is:
- User uploads *.zip file, containing about 30 pictures 2048x1152 each
- Application unzips zip file
- Application takes the pictures and makes a large sprite out of all of them
- Application then redirects to a different page for processing.
Now the problems is with making the large sprite. It consumes 100% CPU (according to top
on the server), it fails when there are many images. Also the process outputs Killed
without any further error message.
Now, I'm sure I can solve this by throwing more muscle on the server, but I'm having the feeling that the one I have isn't the most efficient.
What can I try to mitigate the problem?