asp.net worker process grow tremendously

Discussion in 'ASP .Net' started by =?Utf-8?B?TEJU?=, Jul 22, 2005.

  1. Hi experts,

    I have an application which will retrieve data from database and extract the
    data to Excel file.

    My working mechanism is to create a while loop to loop at every criteria/key
    which will execute a MSSQL stored procedure to retrieve the data based on
    particular key/criteria. The results will be returned to my application once
    the stored procedure is finish executed.

    Problem happens when results to be returned consist of many rows (says few
    tens of thousand rows). The asp.net worker process will grow tremendously
    until reaching 800++MB and the CPU usage hits 90% which cause the server in
    crawl.

    Any workaround I can take to cope this problem? Any help would be much
    appreciated. Thanks
    =?Utf-8?B?TEJU?=, Jul 22, 2005
    #1
    1. Advertising

  2. Are you loading Excel on the server? If so that may be the problem. I would
    try to isolate the problem by commenting out different things in the process
    until you notice the increase then it would help to determine the next course
    of action.
    --
    Robert


    "LBT" wrote:

    > Hi experts,
    >
    > I have an application which will retrieve data from database and extract the
    > data to Excel file.
    >
    > My working mechanism is to create a while loop to loop at every criteria/key
    > which will execute a MSSQL stored procedure to retrieve the data based on
    > particular key/criteria. The results will be returned to my application once
    > the stored procedure is finish executed.
    >
    > Problem happens when results to be returned consist of many rows (says few
    > tens of thousand rows). The asp.net worker process will grow tremendously
    > until reaching 800++MB and the CPU usage hits 90% which cause the server in
    > crawl.
    >
    > Any workaround I can take to cope this problem? Any help would be much
    > appreciated. Thanks
    =?Utf-8?B?cmdyYW5kaWRpZXI=?=, Jul 22, 2005
    #2
    1. Advertising

  3. Thanks Robert. The Excel file is directly opened at client site. Usually the
    asp.net worker process will just increase in great scale when the records to
    be returned are reaching 10,000 rows. But my case is even worse, the records
    might reach 80,000 - 90,000 rows in normal query. I'm keen to know is there
    any way to avoid the worker process grows like crazy.

    "rgrandidier" wrote:

    > Are you loading Excel on the server? If so that may be the problem. I would
    > try to isolate the problem by commenting out different things in the process
    > until you notice the increase then it would help to determine the next course
    > of action.
    > --
    > Robert
    >
    >
    > "LBT" wrote:
    >
    > > Hi experts,
    > >
    > > I have an application which will retrieve data from database and extract the
    > > data to Excel file.
    > >
    > > My working mechanism is to create a while loop to loop at every criteria/key
    > > which will execute a MSSQL stored procedure to retrieve the data based on
    > > particular key/criteria. The results will be returned to my application once
    > > the stored procedure is finish executed.
    > >
    > > Problem happens when results to be returned consist of many rows (says few
    > > tens of thousand rows). The asp.net worker process will grow tremendously
    > > until reaching 800++MB and the CPU usage hits 90% which cause the server in
    > > crawl.
    > >
    > > Any workaround I can take to cope this problem? Any help would be much
    > > appreciated. Thanks
    =?Utf-8?B?TEJU?=, Jul 22, 2005
    #3
  4. =?Utf-8?B?TEJU?=

    Brock Allen Guest

    Consider disabling buffering when generating the response.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > Hi experts,
    >
    > I have an application which will retrieve data from database and
    > extract the data to Excel file.
    >
    > My working mechanism is to create a while loop to loop at every
    > criteria/key which will execute a MSSQL stored procedure to retrieve
    > the data based on particular key/criteria. The results will be
    > returned to my application once the stored procedure is finish
    > executed.
    >
    > Problem happens when results to be returned consist of many rows (says
    > few tens of thousand rows). The asp.net worker process will grow
    > tremendously until reaching 800++MB and the CPU usage hits 90% which
    > cause the server in crawl.
    >
    > Any workaround I can take to cope this problem? Any help would be much
    > appreciated. Thanks
    >
    Brock Allen, Jul 22, 2005
    #4
  5. =?Utf-8?B?TEJU?=

    jasonkester Guest

    Are you sure you're disposing of your connections properly? Since
    you're tasking the CPU so hard, it may just be waiting around for a
    good lull in the action in which to garbage collect. You can help it
    along with using{}'s , .Dispose()s and a small Thread.Sleep() in your
    loop.

    This has worked for me in the past when I've hit the problem you
    describe.

    Jason Kester
    Expat Software Consulting Services
    http://www.expatsoftware.com/
    jasonkester, Jul 22, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henry Chen
    Replies:
    0
    Views:
    417
    Henry Chen
    Jun 10, 2004
  2. alex
    Replies:
    1
    Views:
    619
    Lau Lei Cheong
    Feb 4, 2005
  3. Andrea Raimondi
    Replies:
    1
    Views:
    431
  4. Nick
    Replies:
    1
    Views:
    283
    Gregory A. Beamer
    Oct 23, 2009
  5. Navin Mishra

    How to get process id of hosting ASP.NET worker process ?

    Navin Mishra, Feb 7, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    409
    Navin Mishra
    Feb 7, 2006
Loading...

Share This Page