Gold R5 GetImage.ashx in error log a lot

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Gold R5 GetImage.ashx in error log a lot

Post by AbleMods » Thu Aug 01, 2013 5:38 am

We're seeing several of these errors consistently in the log file but can't decide the cause. We suspect it's a browser or bot that simply shuts down prior to the page being delivered to the client. Any thoughts?

It's better in Gold R5 than previous releases - we used to see dozens of these every day. Now it's only a few a day. Not sure if it's because something was fixed or the messages are simply being suppressed.
An error has occured at http://<website>/GetImage.ashx?maintainAspectRatio=true&maxHeight=400&maxWidth=400&Path=~/Assets/vga-adapters/vga-hdmi-converter-audio-2.jpg
Exception: Internal Server Error. Stack Trace: at AbleCommerce.GetImage.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: The remote host closed the connection. The error code is 0x80070057. Inner Exception Stack Trace: at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect) at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush() at System.Web.HttpResponse.Flush(Boolean finalFlush) at AbleCommerce.GetImage.ServeImage(HttpResponse response, String path, Int32 desiredHeight, Int32 desiredWidth, Int32 maxHeight, Int32 maxWidth, Boolean maintainAspectRatio, Int64 quality) at AbleCommerce.GetImage.ProcessRequest(HttpContext context)
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Gold R5 GetImage.ashx in error log a lot

Post by jmestep » Thu Aug 01, 2013 12:00 pm

I have seen them a little, but the ones I saw were caused by the customer having an image url in a product, but the image file didn't exist.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Gold R5 GetImage.ashx in error log a lot

Post by AbleMods » Thu Aug 01, 2013 12:58 pm

I think I've got it fixed. Lots of documentation on it once I could see that actual exception being thrown.

The majority of reports suggest it can happen when a user clicks to another page before the current page has completely downloaded. Or a bot is crawling the site and does not completely receive the HTTP response before closing the HTTP connection.

Solution I installed has eliminated the error thus far.

Edit the /getimage.ashx file and find this code around line 308 near the end of ServeImage():

Code: Select all

                                response.Flush();
                            return;
replace it with this code:

Code: Select all

                            // BEGIN MOD: AbleMods.com
                            // DATE:  08/01/2013
                            if (response.IsClientConnected)
                            {
                                response.Flush();
                            }
                            // END MOD: AbleMods.com
                            return;
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Gold R5 GetImage.ashx in error log a lot

Post by jmestep » Tue Nov 26, 2013 5:48 am

I see Able has added code to R6 to do the above, but I'm still getting errors on a site. (This is just FYI in case Able looks at this post)
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Gold R5 GetImage.ashx in error log a lot

Post by Katie » Tue Nov 26, 2013 8:01 pm

This should have been fixed in R6 with AC8-2045. I found it in the change log, and resolved/confirmed by the dev team in our bug reporting system.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Gold R5 GetImage.ashx in error log a lot

Post by jmestep » Tue Dec 03, 2013 2:17 pm

Katie, I've done some research and it looks like the message can be logged even with the fix, not saying the fix was wrong and it helps. It looks like it's one of those "noise" exceptions like invalid view state. I'm going to try to filter it out in the global.asax, like you did the view state one, but an "official" fix would be good to make sure I'm doing it the best way.
Here is one of the links I found while searching:
http://blog.whitesites.com/fixing-The-r ... 9_blog.htm

I think if we can just get it out of the log in the admin it will help- that way we see only "real" errors, not exceptions.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply