|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-06-24 22:29 UTC] oliviapurvis at yahoo dot com
Description:
------------
Imagick works fine under most circumstances. But when I tested it under load, apache produces lots of this error:
Parent: child process exited with status 3221225477 -- Restarting.
I've done some test and it seems that if there are 2 or more simultaneous request to php scripts using Imagick, it will cause the error. I'm running Apache 2.2.3, PHP 5.2.3, Imagick latest beta, and Win XP Home SP2.
Generating a backtrace is beyond me. But I've included some codes here to reproduce it. See below.
Reproduce code:
---------------
Make a php script, im.php:
<?php
$im=new Imagick();
$im->readImage('image.jpg');
header('Content-Type: image/jpeg');
echo $im->getImageBlob();
$im->destroy();
?>
Make an html file, test.htm:
</head><body>
<img src="http://localhost/im.php?1"><img src="http://localhost/im.php?2">
<img src="http://localhost/im.php?3"><img src="http://localhost/im.php?4">
<img src="http://localhost/im.php?5"><img src="http://localhost/im.php?6">
<img src="http://localhost/im.php?7"><img src="http://localhost/im.php?8">
<img src="http://localhost/im.php?9"><img src="http://localhost/im.php?10">
</body></html>
Put the script, html file and an image (any jpg image name image.jpg) into your localhost. Then run test.htm on your localhost, i.e. http://localhost/test.htm. If there is no error on the first run, reload the page a few times. Running on a remote host might not reproduce the error as there could be latency.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 17 07:00:01 2025 UTC |
Does the same error happen with this code: <?php $im=new Imagick( 'image.jpg' ); header('Content-Type: image/jpeg'); echo $im; ?> or with your code if you do not call the ->destroy() method?