Last post Nov 28, 2007 04:09 PM by Hightechrider
Nov 28, 2007 04:09 PM|Hightechrider|LINK
We are running a large web site with a distributed image rendering farm written in ASP.net using GDI+ on Windows Server 2003. Each server is dual-proc, HT and we run 16 rendering threads in parallel.
Very occasionally we see an exception "Parameter is not valid" but when we retry the exact same render job it renders just fine. The stack looks like this ...
[System.ArgumentException] Parameter is not valid.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at System.Drawing.Bitmap..ctor(Int32 width, Int32 height) at ...
So we aren't even touching the file at this point, all we are doing is creating a new Bitmap into which we will render a copy of the file. The arguments in this case were Width: 3296, Height: 2472.
Does anyone have any insight into why the simple act of creating a new Bitmap could cause a 'Parameter Error' on a seemingly sporadic basis?