PAID: Problem with IMagick, Huge temp files, LF a developer

Do you need consulting from ImageMagick experts and are willing to pay for their expertise? Or are you well versed in ImageMagick and offer paid consulting? If so, post here otherwise post elsewhere for free assistance.
User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by fmw42 »

If the temp files do not include "magick" in the name, then I doubt they were left by Imagemagick.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

fmw42 wrote:
2020-04-18T13:26:39-07:00
AnavPT wrote:
2020-04-18T13:21:29-07:00
Ok, where should I get to know the GhostScript version? My hosting wrote they are not running it
Imagemagick requires Ghostscript to process EPS/PS/PDF files. So if you are creating and output, then you must be using it and have it on your System.

What do you get from

Code: Select all

convert -version
Does it list gs or gslib in the Delegates?

If you have Ghostscript on your system and it is in the $PATH environment variable, then you should be able to type

Code: Select all

gs --version
and get the version


For example:

Code: Select all

convert -version
Version: ImageMagick 6.9.11-6 Q16 x86_64 2020-04-06 https://imagemagick.org
Copyright: © 1999-2020 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps raw rsvg tiff webp x xml zlib

Code: Select all

gs --version
9.50
Where should I type these? I checked for a "command line" in cpanel, but no luck

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

Isn't that the GhostScript command I posted, started with "gs"?

I waiting for the developer for the ImageMagick command, I only have a cronjob.

Sample temp file name: magick-10389-Iq2DR9nQH71, includes "magick"
Last edited by AnavPT on 2020-04-19T04:04:03-07:00, edited 1 time in total.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

fmw42 wrote:
2020-04-18T13:24:18-07:00
What is your Imagick code? What is your version of Ghostscript? Your file converts fine for me on IM 6.9.11.6 Q16 Mac OSX. No temp files are left in /tmp.

Could the issue be with your Imagick or PHP?
How to track that down?

I think there are no limiting policies for IM set by the hosting

--

I got a response here also, which I don't really understand: https://bugs.ghostscript.com/show_bug.cgi?id=702345

I asked the developer for IM command, GS version and GS command.

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by magick »

We're at the point of diminishing returns. ImageMagick and Ghostscript appear to be working properly. Perhaps your hosting plan is not sized correctly. We have a 6 core, 32GB host and the conversion worked without complaint and no temporary files remained.

To reduce the resource requirements, add -density 20 to your command line to reduce the resource requirements. Run this conversion:

Code: Select all

convert -limit memory 2GiB -limit map 4GiB -define registry:temporary-path=./ -density 20 lines.eps lines.jpg
identify lines.jpg
Does it complete? Are there any temporary files that remain in your current directory (the one where you ran the command above)? If so, do any of them start with magick-? The magick- prefix, if present, would suggest ImageMagick is leaving temporary files. Otherwise, some other part of your workflow is the culprit.

Next try the command above but remove `-density 20`. Does it complete? Are their any magick- temporary files in your current directory? If not, ImageMagick is working properly and the problem is likely somewhere else in your workflow or you have an undersized host.

Next, try the commands above with the latest portable version of ImageMagick 7 @ https://imagemagick.org/download/binaries/magick. Run the commands above again but substitute `./magick` instead of `convert`.

Recall, we can only help you if the problem is traced to ImageMagick. We cannot help you with other parts of your workflow or other software packages.

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by fmw42 »

You have never identified what software you are using! Is it PHP Imagick? What is your processing commands or script? Do you have a PHP page that you are running? What are the names of the 19 MB file that are left on your system? How do you know that Imagemagick is even being use?

The response from your ISP hosting company essentially said that it works fine for them. No files are left by the ghostscript command.

If you cannot answer these questions, then we likely cannot help you much more.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

ImageMagick 6.7.8-9

names:

-rw-r--r-- 1 stockvec stockvec 1.3G Apr 12 00:29 magick-7099Gyf4tzgnM2YS1
-rw-r--r-- 1 stockvec stockvec 1.3G Apr 13 00:28 magick-23063rQN6ZItfKoka1
-rw-r--r-- 1 stockvec stockvec 2.1G Apr 15 02:57 magick-26511KAZX8S5EPV2G1
-rw------- 1 stockvec stockvec 2.5G Apr 13 06:33 magick-20186XmQId5TNEdFM
-rw------- 1 stockvec stockvec 2.5G Apr 14 08:12 magick-18206DFqBHbTq9yvB
-rw------- 1 stockvec stockvec 3.1G Apr 12 00:29 magick-7099CV3-XB72IZxv
-rw------- 1 stockvec stockvec 3.1G Apr 13 00:29 magick-230634ttiFnkxYm7M

I had to turn on a function in Cpanel called "imagick"

In my first post there is a link, which has these answers (well a few of them)

A posted a script starting with gs -- thought that is the ghost script command

here it is:

gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 -sDEVICE=pamcmyk32 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r1500x1500 -g54187x37500 -sOutputFile=/tmp/magick-25269EjNy90NAfnnR%d -f/tmp/magick-25269ENWpWU313ARs -f/tmp/magick-25269UQuoD7BLHow4


Yes I have a php page that is running the script.

The developer warn us about to use imagemagick if we can, on the settings options panel I have choosen to use ImageMagick

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

I'm waiting for the GhostScript version and the IM command as I said

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by magick »

The first thing you need to do is to upgrade your release of ImageMagick. Your version is ancient. There has likely been 10,000 improvements and bug fixes since your release. As we previously recommended, download https://imagemagick.org/download/binaries/magick. You can rename it to convert if you want. Now repeat your command set. Does the problem persist? `magick` is the latest portable release of ImageMagick. No installation required.

You can determine the release of Ghostscript with this command: `gs -v`

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by fmw42 »

Can you post the PHP commands you use to process your image?

The command in the file is the Ghostscript command that is run when Imagemagick or Imagick process your image. Imagick and Imagemagick are not the same thing. Imagick uses Imagemagick and Imagemagick calls Ghostscript to process the image.

Perhaps the Imagick is bad or the Imagemagick was not a good release. In fact, I have worked with other clients using 6.7.8.9 and they have had issue with that version. Linux systems are not very reliable with Imagemagick, since they try to patch rather than upgrade. They often only patch for security and not to fix bugs or add other enhancements. As user magick has said, perhaps you can get them to install the portable version of Imagemagick 7 on your system. However, one needs to be sure that Imagick is compatible with that version. Alternately, find a Hosting company that uses Imagemagick 7 and compatible Imagick/PHP.

Another test you can do is use PHP exec() to run your conversion and see if that leaves a large image behind. You can also get the Ghostscript version by putting "gs -v" into a PHP exec() command.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

magick wrote:
2020-04-19T13:07:13-07:00

You can determine the release of Ghostscript with this command: `gs -v`
Where to write this command? I'm on a shared hosting as I said

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by magick »

We can only help you with ImageMagick. You might want to post to StackOverflow for help with Linux, CPanel, Ghostscript, etc.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

And can't be one you do if I pay? This most of this is Chinese for me.

A more experienced person could do it under 20 minute.

AnavPT
Posts: 33
Joined: 2020-04-15T04:01:15-07:00
Authentication code: 1152

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by AnavPT »

I try to find a freelancer on a freelancer site and show him these threads. That's best idea for now

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: PAID: Problem with IMagick, Huge temp files, LF a developer

Post by magick »

Yes, you can pay someone. We were trying to help you for free but it looks like your best option is to find a developer, pay a few bucks, and resolve this problem in short order.

Locked