I am running a VM that serves my production site with DigitalOcean.
My whole site hangs while creating a large 100mb/100page pdf, or while compiling several pictures in to one large one.
The site runs on
PHP 7.0.1 and nginx 1.6.0 in Ubuntu 14.04.
When a user runs memory intensive task the whole site hangs until the task has completed.
This happens in a script that creates and compiles a PDF with Imagick and WkHtmlToPdf extensions.
It takes about 2 minutes to run, and no other users can access the site while this task is running.
VM Specs:
Ubuntu 14.04 x64 512 MB Memory / 20 GB Disk / AMS2
VM monitor peaks while running wkhtmltopdf/imagick
CPU 50%, memory 99%
Seems like it could be a memory issue.
How do i prevent one request from making the whole site unresponsive?
Also can i really be true that a small server can't handle one user generating a large pdf?
Also shouldn't a memory/cpu intensive tasks still leave room for the requests of other users, or do i need to manually enable parallelisation somehow? Maybe 512 mb isn't enough?
Thanks in advance!