- convert -define registry:temporary-path=/data/tmp image.jpg image.png
Resource limits are not working
Re: Resource limits are not working
Clearly the environment variables are not being set for your process. If so, your temporary files would show up in /home/magick. With PHP you can use putenv() to set environment variables or you can include them on the command line (e.g. -limit area 1mb) or edit them in configure.xml (see http://www.imagemagick.org/script/resources.php). From the command line you can set the temporary path, for example, as
Re: Resource limits are not working
The env var is correct for user nobody which is what Apache is running as. MAGICK_TMPDIR is set but the output still is using /tmp which should now be /home/magick.
Re: Resource limits are not working
I tried the limit attribute and that doesn't do anything different.
I will try the configure.xml although I can not find one anywhere with locate.
......are you sure this is supposed to work. Nothing I do here is working.
Thank you,
~Shawn
I will try the configure.xml although I can not find one anywhere with locate.
......are you sure this is supposed to work. Nothing I do here is working.
Thank you,
~Shawn
Re: Resource limits are not working
The important thing is it works as advertised for us .
Re: Resource limits are not working
/usr/local/lib/ImageMagick-6.5.0/config/configure.xml:
convert -define registry:temporary-path=/data/tmp image.jpg image.png, tried it.
Debug Output:
Still putting it in /tmp.
Any ideas?
Thank you,
~Shawn
Code: Select all
...
<configure name="MAGICK_TMPDIR" value="/home/magick"/>
<configure name="MAGICK_MEMORY_LIMIT" value="32mb"/>
<configure name="MAGICK_MAP_LIMIT" value="64mb"/>
<configure name="MAGICK_AREA_LIMIT" value="128mb"/>
<configure name="MAGICK_DISK_LIMIT" value="256mb"/>
<configure name="MAGICK_FILE_LIMIT" value="768"/>
...
Debug Output:
Code: Select all
17:45:13 0:01 0.030u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/246.0mb
17:45:13 0:01 0.030u 6.0.7 convert[16202]: cache.c/DestroyCacheInfo/1193/Cache
destroy
17:45:13 0:01 0.030u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/246.0mb
17:45:13 0:01 0.030u 6.0.7 convert[16202]: cache.c/DestroyCacheInfo/1193/Cache
destroy
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/246.0mb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: cache.c/DestroyCacheInfo/1193/Cache
destroy
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XXMV9Tex
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/AcquireMagickResource/209/Resource
file: 1/1/12kb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XXvdMPtt
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/AcquireMagickResource/209/Resource
file: 1/2/12kb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/246.0mb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: cache.c/DestroyCacheInfo/1193/Cache
destroy
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/246.0mb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: cache.c/DestroyCacheInfo/1193/Cache
destroy
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XXMV9Tex
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
file: 1/1/12kb
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XXvdMPtt
17:45:13 0:01 0.040u 6.0.7 convert[16202]: resource.c/RelinquishMagickResource/710/Resource
file: 1/0/12kb
Any ideas?
Thank you,
~Shawn
Re: Resource limits are not working
putenv('MAGICK_TMPDIR=/home/magick');
Does not work either.
Does not work either.
Re: Resource limits are not working
Type
- identify -verbose
- convert -debug cache -limit area 0 -define registry:temporary-path=/data/tmp logo: logo.png
- 2009-04-20T20:43:52-04:00 0:00 0.000u 6.5.1 Cache convert[20360]: cache.c/DestroyPixelCacheInfo/1513/Cache
destroy
2009-04-20T20:43:52-04:00 0:00 0.000u 6.5.1 Cache convert[20360]: cache.c/ExtendCache/3748/Cache
extend LOGO[0] (/data/tmp/magick-XXkOfLqN[3], disk, 2.93mb)
2009-04-20T20:43:52-04:00 0:00 0.000u 6.5.1 Cache convert[20360]: cache.c/OpenPixelCache/3943/Cache
open LOGO[0] (/data/tmp/magick-XXkOfLqN[3], disk, 640x480 2.93mb)
Re: Resource limits are not working
Code: Select all
root [~]# identify -version
Version: ImageMagick 6.5.0-0 2009-03-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Code: Select all
10:22:09 0:01 0.030u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:22:09 0:01 0.030u 6.0.7 convert[9931]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:22:09 0:01 0.040u 6.0.7 convert[9931]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:22:09 0:01 0.040u 6.0.7 convert[9931]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XX7mvUU1
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/AcquireMagickResource/209/Resource
file: 1/1/12kb
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XXqvREqv
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/AcquireMagickResource/209/Resource
file: 1/2/12kb
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:22:09 0:01 0.040u 6.0.7 convert[9931]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:22:09 0:01 0.040u 6.0.7 convert[9931]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XX7mvUU1
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
file: 1/1/12kb
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XXqvREqv
10:22:09 0:01 0.040u 6.0.7 convert[9931]: resource.c/RelinquishMagickResource/710/Resource
file: 1/0/12kb
Re: Resource limits are not working
It looks like you set the MAGICK_TEMPORARY_PATH variable in your configure.xml file. That overrides the command line settings.
Re: Resource limits are not working
Ok, well, I just compiled and installed 6.5.1-3 just fine.
Its configure.xml lines for those vars are commented out.
I am getting the same results with the previous command line.
/usr/bin/convert -debug cache,resource -limit area 0 -define registry:temporary-path=/home/magick users/21/29/2778034911cafa1f7cf/files/Talisma_Customer_Client.pdf -trim -resize '960x960>' users/21/29/2778034911cafa1f7cf/jpgs/Talisma_Customer_Client_pdf.png
No env vars for IM are set for user 'nobody'
What now?
Thank you,
~Shawn
Code: Select all
root@ [~]# identify -version
Version: ImageMagick 6.5.1-3 2009-04-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Code: Select all
root [/usr/local/lib/ImageMagick-6.5.1/config]# tail configure.xml
<configure name="WEBSITE" value="http://www.imagemagick.org"/>
<configure name="QuantumDepth" value="16"/>
<!-- <configure name="MAGICK_TEMPORARY_PATH" value="/tmp"/> -->
<!-- <configure name="MAGICK_MEMORY_LIMIT" value="2gb"/> -->
<!-- <configure name="MAGICK_MAP_LIMIT" value="8gb"/> -->
<!-- <configure name="MAGICK_AREA_LIMIT" value="4gb"/> -->
<!-- <configure name="MAGICK_DISK_LIMIT" value="16eb"/> -->
<!-- <configure name="MAGICK_FILE_LIMIT" value="768"/> -->
<!-- <configure name="MAGICK_THREAD_LIMIT" value="8"/> -->
</configuremap>
/usr/bin/convert -debug cache,resource -limit area 0 -define registry:temporary-path=/home/magick users/21/29/2778034911cafa1f7cf/files/Talisma_Customer_Client.pdf -trim -resize '960x960>' users/21/29/2778034911cafa1f7cf/jpgs/Talisma_Customer_Client_pdf.png
Code: Select all
10:58:51 0:01 0.040u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:58:51 0:01 0.040u 6.0.7 convert[23440]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:58:51 0:01 0.050u 6.0.7 convert[23440]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:58:51 0:01 0.050u 6.0.7 convert[23440]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XXHAKlqG
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/AcquireMagickResource/209/Resource
file: 1/1/12kb
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/AcquireUniqueFileResource/369/Resource
/tmp/magick-XXvucrZs
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/AcquireMagickResource/209/Resource
file: 1/2/12kb
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:58:51 0:01 0.050u 6.0.7 convert[23440]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
area: 0/0/0
10:58:51 0:01 0.050u 6.0.7 convert[23440]: cache.c/DestroyCacheInfo/1193/Cache
destroy
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XXHAKlqG
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
file: 1/1/12kb
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishUniqueFileResource/743/Resource
/tmp/magick-XXvucrZs
10:58:51 0:01 0.050u 6.0.7 convert[23440]: resource.c/RelinquishMagickResource/710/Resource
file: 1/0/12kb
Code: Select all
CONSOLE=/dev/console
SELINUX_INIT=YES
TERM=linux
INIT_VERSION=sysvinit-2.85
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_=/usr/bin/printenv
runlevel=3
RUNLEVEL=3
PWD=/home/StableSite/admin
LANG=en_SG.UTF-8
previous=N
PREVLEVEL=N
SHLVL=3
HOME=/
Thank you,
~Shawn
Re: Resource limits are not working
I tried uncommenting the configure.xml lines and putting in /home/magick. I then tried removing the command line attribute for the dir.
Nothing is working whatsoever at all.
Please help.
Nothing is working whatsoever at all.
Please help.
Re: Resource limits are not working
On a side note, ever since I restarted the server, now the .pdfs won't convert. PNGs and JPGs are working fine. Before I restared the server, I could convert PDFs to PNGs as per the above command just fine. Then after I rebooted so the server would read the new env vars, PDFs stopped working. Then I upgraded the version and they still don't work.
This is driving me totally mad. Please help.
Thank you.
This is driving me totally mad. Please help.
Thank you.
Re: Resource limits are not working
You say /usr/bin/convert shouldn't that be /usr/local/bin/convert?
Re: Resource limits are not working
I can't see any debug output now with using /usr/local/bin/convert.
.ai and .pdf files still aren't working.
.ai and .pdf files still aren't working.
Re: Resource limits are not working
Unfortunately we cannot reproduce any of the problems you are having. Until we can reproduce the problem, we can't offer any additional help.