Page 1 of 1

Crash due to server overload ... perhaps?

Posted: 2011-08-18T14:38:26-07:00
by guillaumech
Hello everyone,

I need your advice to solve a bug. I've a server with a weather map generation script, this script use the resizing picture. I noticed that at different times, the script did not give the same result. Server load could have an impact? This is a script that uses lots of memory, and threads.

Sorry for my English, I'm French ... :(
Thx a lot.

Guillaume

Re: Crash due to server overload ... perhaps?

Posted: 2011-08-18T21:03:50-07:00
by anthony
Different results is not a crash! And more information is a must.

Typically the the causes of different results for the same data in Im has been attributed to a problem with OpenMP (multi-threaded). Typically the differences will be scan line oriented as most thread in IM is done by assigning different image rows to different threads.

The first test of this is to turn off threading and see if the data comes out correct (though typically slower), one simple way is to set the environment variable MAGICK_THREAD_LIMIT=1 the other is to compile IM with openmp disabled from the build configuration.

I do however recommend you ensure your IM is the latest (or near latest) version. Version 6.1.7-7 is avaible, 6.1.7-8 will be out in a few days. But any 6.1 version should be okay.

Re: Crash due to server overload ... perhaps?

Posted: 2011-08-19T02:38:08-07:00
by guillaumech
Thank you Anthony for your answer.

More informations: the script uses two threads, but I locked the call for IM in both threads. That is to say that IM is not called at the same time in parallel. That said, I can run the script with data at time t and at time t +1 (so the server will not have the same load), the generation of maps is different because the interpolation for resizing is not the same.
I will try to take the latest version of IM. But it is as if the server memory failed in t and it was a different interpolation at t+1 when it has more memory. It's complicated to explain...

Re: Crash due to server overload ... perhaps?

Posted: 2011-08-19T18:57:51-07:00
by anthony
It sounds like it. It also sounds like you are calling some type of ImageMagick API from a threaded program.