Multiple copies of "convert" in memory
Multiple copies of "convert" in memory
Hello guys,
I tried to update IM from 6.7.1-0 to 6.7.6-5, but very soon I got a huge server's load average.
When I ran "htop" I found a very strange thing:
As you can see, convert produces multiple copies of SAME command. They are absolutely same but convert runs 6-10 times for some reason.
I had to install 6.7.1-0 back but the bug didn't disappear.Thanks god I had my old IM 6.2.8 at /usr/bin/convert. I've changed path to my old IM from /usr/local/bin/convert where the new version is stored, and the problem has been solved.
Could please someone explain me what was that???? And how can I use new version of IM???
Please answer ASAP!
Thanks in advance!
P.S.: Just in case "uname -a":
Linux server.com 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:32:29 EDT 2011 i686 i686 i386 GNU/Linux (CentOS)
I tried to update IM from 6.7.1-0 to 6.7.6-5, but very soon I got a huge server's load average.
When I ran "htop" I found a very strange thing:
As you can see, convert produces multiple copies of SAME command. They are absolutely same but convert runs 6-10 times for some reason.
I had to install 6.7.1-0 back but the bug didn't disappear.Thanks god I had my old IM 6.2.8 at /usr/bin/convert. I've changed path to my old IM from /usr/local/bin/convert where the new version is stored, and the problem has been solved.
Could please someone explain me what was that???? And how can I use new version of IM???
Please answer ASAP!
Thanks in advance!
P.S.: Just in case "uname -a":
Linux server.com 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:32:29 EDT 2011 i686 i686 i386 GNU/Linux (CentOS)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
What was your command? Was it in a script?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
run
type -a convert
and see if you have multiple version of IM at the same location.
type -a convert
and see if you have multiple version of IM at the same location.
Re: Multiple copies of "convert" in memory
Yes, it was inside .php script. I run "system('/usr/local/bin/convert /path/to/image.gif -resize SIZE_VALUE RESIZE VALUE /path/to/result.gif');"
As you can see on a screenshot "convert" was executed only ONCE from a script. BUT after that this convert process executed more same processes.
convert is /usr/bin/convert
As you can see on a screenshot "convert" was executed only ONCE from a script. BUT after that this convert process executed more same processes.
convert is /usr/local/bin/convertrun
type -a convert
and see if you have multiple version of IM at the same location.
convert is /usr/bin/convert
Re: Multiple copies of "convert" in memory
Do you need any additional information?
Re: Multiple copies of "convert" in memory
I made a test... I run a plain command from a shell "/usr/local/bin/convert /1.gif 100x100 /2.gif" and see THE SAME bug -- five copies of convert in memory!
Please advice!
Please advice!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
I probably cannot help much as I am not a unix guru nor a PHP expert.
But, I don't understand this command
system('/usr/local/bin/convert /path/to/image.gif -resize SIZE_VALUE RESIZE VALUE /path/to/result.gif');"
Why do you have multiple values after -resize? What is SIZE_VALUE RESIZE VALUE -- this is 3 values? Can you give me a command with actual numbers?
Have you tried using exec() rather than system()?
But, I don't understand this command
system('/usr/local/bin/convert /path/to/image.gif -resize SIZE_VALUE RESIZE VALUE /path/to/result.gif');"
Why do you have multiple values after -resize? What is SIZE_VALUE RESIZE VALUE -- this is 3 values? Can you give me a command with actual numbers?
Have you tried using exec() rather than system()?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
Thanks. That is much clearer. But it looks fine to me and you only have two versions of IM as seen by your type -a convert. So I don't know what to advise at this point. You will need more advanced help than I can give. Sorry.I made a test... I run a plain command from a shell "/usr/local/bin/convert /1.gif 100x100 /2.gif" and see THE SAME bug -- five copies of convert in memory!
Please advice!
Edit:
However,
/usr/local/bin/convert /1.gif 100x100 /2.gif
you left out the -resize!
Re: Multiple copies of "convert" in memory
It was just an example. You don't need to be an expert in PHP since I can reproduce this bug in a shell manually.
Here is the command: "/usr/local/bin/convert /1.gif -resize 100x100 /2.gif"
Here is the command: "/usr/local/bin/convert /1.gif -resize 100x100 /2.gif"
I left it out only here, on forum.you left out -resize
Last edited by gregory on 2012-04-14T11:50:35-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
gregory wrote:It was just an example. You don't need to be an expert in PHP since I can reproduce this bug in a shell manually.
Here is the command: "/usr/local/bin/convert /1.gif -resize 100x100 /2.gif"
It left it out only here, on forum.you left out -resize
As I said, it looks fine to me. You will need more advanced help than I can give. Sorry.
Re: Multiple copies of "convert" in memory
Where I can find advanced help? You mean, wait for someone here?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Multiple copies of "convert" in memory
Yes, you will have to wait for one of the IM developers or someone else who knows more about unix than I.gregory wrote:Where I can find advanced help? You mean, wait for someone here?
Re: Multiple copies of "convert" in memory
I tried to reinstall IM with "--disable-openmp" but that didn't do the trick.
Re: Multiple copies of "convert" in memory
I'm used to seeing "multiple copies" of an application that I run at work (not *Magick) in the "top" display.
It's shown once per CPU; the code (and data) is really only occupying one block of shared memory.
So I guess your question is really how to defeat the multi-processing, if that's what you want. In the
application I run, there's an opportunity on the command line to specify how many processors to
use. I'm not sure if that's a feature of the code or a feature of MP linux.
It's shown once per CPU; the code (and data) is really only occupying one block of shared memory.
So I guess your question is really how to defeat the multi-processing, if that's what you want. In the
application I run, there's an opportunity on the command line to specify how many processors to
use. I'm not sure if that's a feature of the code or a feature of MP linux.