problem with ThreadAbortException with large workbooks

Last post 06-09-2009, 2:56 PM by Alex.Filipovici. 11 replies.
Sort Posts: Previous Next
  •  06-19-2006, 3:53 PM 50831

    problem with ThreadAbortException with large workbooks

     I have a web application which throws a ThreadAbortException when trying to read a 7 megabyte (approximate) spreadsheet. My application will throw an HttpException to the client, but the inner exception is a ThreadAbortException during Aspose.Cells.Workbook.Open().

    I need to find out what may be causing the error, and how it might be avoided. I don't have the luxury of catching and ignoring a failed Open() in my application.

    [I have a sample web app which demonstrates the problem, but how do I forward it?]

    The app is running on the following platform:

    Windows 2003, Web Edition, Service Pack 1
    ASP.NET version 1.1.4322
    IIS version 6
    2 Gig available ram
    Aspose.Cells.dll version 3.9.1.0

    Another key detail: In the web.config, the following entry must be set to "false" to make the error occur:

    <compilation defaultLanguage="c#" debug="false" />

    When debug="true", the program will successfully load all five sheets.

    When it fails, the program will fail when attempting to open the fourth workbook. It will not fail when running on Windows XP with IIS 5. It does not fail when openning smaller spreadsheets, though I am not sure of the size threashold.


    (Please note, I have only one workbook in the sample....be sure to copy it to four other copies named sample2.xls, sample3.xls, etc etc, if you use my sample app.)

    Thank you very much! Smile [:)]
     
  •  06-19-2006, 5:54 PM 50842 in reply to 50831

    Re: problem with ThreadAbortException with large workbooks

    It seems that it's a configuration problem. I don't have a window2003 on hand so I cannot test it.

    Generally I think you should assign more memory to IIS.

    Please check http://weblogs.asp.net/guys/archive/2005/04/30/405097.aspx , is it possible that you set memory limitation for work process which causes IIS to recycle the memory?


    Laurence Chen
    Chief Architect
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  06-20-2006, 3:13 PM 50952 in reply to 50842

    Re: problem with ThreadAbortException with large workbooks

    After implementing the recommendations discussed in the link you offered, the problem still remains. Using adsutil.vbs, we enabled logging of all application pool resets and determined that at no time was the application being reset due to memory consumption. So perhaps that's not the exact issue we're dealing with.

    With the debug="true" set in our web.config, which is when our application is abe to handle larger excel files, I've recorded peak memory usages as high as 500 Meg. This was done using task manager to watch memory usage during operation of the web application.

    We're stuck, at this point. Is there any way you can accept my sample code and inspect the problem in a Windows 2003 environment of your own?

    Thank you...

     
  •  06-20-2006, 5:48 PM 50957 in reply to 50952

    Re: problem with ThreadAbortException with large workbooks

    Please send your sample code and template files to nanjing@aspose.com. I will check it.


    Laurence Chen
    Chief Architect
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  06-21-2006, 6:25 PM 51065 in reply to 50957

    Re: problem with ThreadAbortException with large workbooks

    Thanks for you sample application.

    1. Please don't set license in Page_Load event handler, that will cause many unneeded SetLicense calls. You can put it in Application_Start event handler.

    2. In your code, you will concurrently open 5 files with all about 7MB size? That causes your program consume too much memory.

    Generally Aspose.Cells will use about 15-20 times memory size compared with file size. So 5X7=35MB file will consume about 500MB memory.

    The solution to your problem are:

    1. Extend IIS memory size as large as possible.

    2. Open only one file at a time and make your files as small as possible.

     


    Laurence Chen
    Chief Architect
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  07-07-2006, 11:09 AM 52152 in reply to 51065

    Re: problem with ThreadAbortException with large workbooks

    Hi Laurence,

    After some time I've had an opportunity to review our application which originally causes the problem I've noted above. In our production application, unlike the sample I sent to you, we only open one workbook, which is approximately 9 MB in size. A single file. By your calculation that would consume 45 MB once loaded.

    This problem occurs in two environments, both Win 2003/IIS 6, with 2Gig and 4Gig of physical memory available respectively.  Also recall that the problem only occurs when the debug value of FALSE is used in the web config of the application.

    We have no control over spreedsheet filesize, since the content is driven by out customer's choices.

    Is there any alternative solution? It appears that we've hit a limitation which  prevents us from scaling our product to a larger audience.

    -John
     
  •  07-07-2006, 6:39 PM 52170 in reply to 52152

    Re: problem with ThreadAbortException with large workbooks

    Dear John,

    I had tried your case in a Win2003/IIS6 without any problem. And my machine only have 512MB memory.

    Since your program works fine the the debug value of TRUE, I think that must be a problem in your configuration. Maybe you have to ask Microsoft about this problem.


    Laurence Chen
    Chief Architect
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  07-12-2006, 11:16 AM 52441 in reply to 52170

    Re: problem with ThreadAbortException with large workbooks

    Hi Laurence,

    Thank you for that information. We now plan to isolate our application on a clean Win '03/IIS 6 machine, with standard settings "out of the box". Is there anything special that you did or had run, in your environment, that we may need to pay attention to?

    Thanks!
     
  •  07-12-2006, 5:09 PM 52459 in reply to 52441

    Re: problem with ThreadAbortException with large workbooks

    No any special settings. Our test machine also use all default settings.

    This is a very strange problem. No other users had reported it. And some of them also use Aspose.Cells with large workbooks.

    If you still find the problem in a clean machine, please post your test project here. And please let me know the whole detail error message and your configurations. Thank you.


    Laurence Chen
    Chief Architect
    Aspose Nanjing Team
    About Us
    Contact Us
     
  •  06-09-2009, 9:43 AM 183089 in reply to 52459

    Re: problem with ThreadAbortException with large workbooks

    Hi,

    Any updates on this issue? We are experiencing it with the latest Aspose Cells version (4.7).

    Waiting for your feedback.

    Best regards,
    Alex

    Alex Filipovici
    http://www.schimba-sistemul.ro
     
  •  06-09-2009, 12:38 PM 183137 in reply to 183089

    Re: problem with ThreadAbortException with large workbooks

    Attachment: Present (inaccessible)

    Hi,

    Thank you for considering Aspose.

    Please try the attached latest fix of Aspose.Cells. If you still face any problem please create a sample application to reproduce the issue and post it here. We will check it soon.

    Thank You & Best Regards,


    Nausherwan Aslam
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  06-09-2009, 2:56 PM 183173 in reply to 183137

    Re: problem with ThreadAbortException with large workbooks

    Thanks for the reply, I will come back with an update as soon as available.

    Best regards,


    Alex Filipovici
    http://www.schimba-sistemul.ro
     
View as RSS news feed in XML