I have a PHP script that modify images using ImageMagick and the script runs for a very long time. Now I want to start a second PHP script while the first script is running, which also processes images, but this script loads dead and breaks after 30s and do nothing. ImageMagick is responsible for this. As soon as I call $image = new Imagick; in second PHP script this script is on hold and waits until script 1 is finished. Can anyone tell me why this is happening and how to solve it for Windows? I use here Xampp with PHP 8.1 on Windows 11. Maybe a stupid question, but I have not found anything on this.
script 1
<?php $image = new Imagick; sleep(10); ?>
script 2
<?php $image = new Imagick; ?>
Start both scripts and script 1 block imagick for 10s, so script 2 is waiting 10s to finish.