locked
why my web service is unable to process request after handling 2000 requests successfully? RRS feed

  • Question

  • User-714029317 posted

    My web service will convert doc, text and pdf files into flash files using print2flash software, but it's working fine for approximately 2000 requests after that it is not proceesing,I'm getting operation time out error message. If I restart the machine the service is working fine for another 2000 requests. Can anyone help me what could be the reason?and how to resolve this issue?

    Friday, November 1, 2013 1:39 AM

Answers

  • User753101303 posted

    How much time the conversion is supposed to take ? Could it be that sometimes a bigger file is submitted taking more than the alloted execution time ?

    If yes, try : http://www.devx.com/vb2themax/Tip/18803 (change executionTimeout in your web.config file).

    It could also be perhaps interesting to keep track of this using for example the IIS log and http://support.microsoft.com/kb/944884/en-us (to see if you see a trend for an ever increasing time which would point at some kind of issue). Or log this directly in your code.

    As you have to reboot to make it work again I still suspect you may have some kind of degradation over time (I'm not telling this is what happens but for example if one keeps a list of all submitted files and convert all files on each call rather than just the last one, the processing time would ever increase until the application is blocked).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 1, 2013 6:44 PM
  • User-488622176 posted

    It is very well possible you are flooding your service, resulting in increasing processing time & resulting in timeouts. Could you trace what comes in and when data goes back to the client (beginning & end of service method) ? If you see the delta between both increasing, you've found the origin.

    In order to fix this, you can:

    • increase timeout values (temporary solution : will postpone the problem but not necessairily fix it if the issue in in the conversion (print2flash) software
    • work asynchronously. Principle :  submit requests to the service, store the request in dbase, process in another worker process (ex: windows service), and deliver the result to the requestor (ex: by email)
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 4, 2013 8:07 AM

All replies

  • User753101303 posted

    Hi,

    You have first to narrow down what happens. I assume the timeout is what is seen by clients ? It's always best to quote the exact error message.

    Don't you have any error server side ?  It looks like exhausting some resource...

    Friday, November 1, 2013 6:40 AM
  • User-714029317 posted

    I've tried recycling and iisreset.

    the error I'm getting at server side is:


    11/1/2013 11:42:16 AM : Before printing timeout expired
    11/1/2013 11:44:18 AM : Thread was being aborted.

    Error log messge is:

    Event code: 3001 Event message: The request has been aborted. Event time: 10/31/2013 12:15:25 PM Event time (UTC): 10/31/2013 12:15:25 PM Event ID: c0911a4071c940c580fc3d75d3c36f6e Event sequence: 2826 Event occurrence: 1 Event detail code: 0
    
    Application information: Application domain: /LM/W3SVC/1/ROOT/code-17-130276759869328000 Trust level: Full Application Virtual Path: /code Application Path: C:\inetpub\wwwroot\code\ Machine name: server
    
    Process information: Process ID: 1048 Process name: w3wp.exe Account name: server\Administrator
    
    Exception information: Exception type: HttpException Exception message: Request timed out.
    
    Request information: Request URL: url Request path: path User host address: server User:
    Is authenticated: False Authentication Type:
    Thread account name: server\Administrator
    
    Thread information: Thread ID: 13 Thread account name: server\Administrator Is impersonating: False Stack trace:



    Friday, November 1, 2013 8:53 AM
  • User753101303 posted

    How much time the conversion is supposed to take ? Could it be that sometimes a bigger file is submitted taking more than the alloted execution time ?

    If yes, try : http://www.devx.com/vb2themax/Tip/18803 (change executionTimeout in your web.config file).

    It could also be perhaps interesting to keep track of this using for example the IIS log and http://support.microsoft.com/kb/944884/en-us (to see if you see a trend for an ever increasing time which would point at some kind of issue). Or log this directly in your code.

    As you have to reboot to make it work again I still suspect you may have some kind of degradation over time (I'm not telling this is what happens but for example if one keeps a list of all submitted files and convert all files on each call rather than just the last one, the processing time would ever increase until the application is blocked).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 1, 2013 6:44 PM
  • User-488622176 posted

    It is very well possible you are flooding your service, resulting in increasing processing time & resulting in timeouts. Could you trace what comes in and when data goes back to the client (beginning & end of service method) ? If you see the delta between both increasing, you've found the origin.

    In order to fix this, you can:

    • increase timeout values (temporary solution : will postpone the problem but not necessairily fix it if the issue in in the conversion (print2flash) software
    • work asynchronously. Principle :  submit requests to the service, store the request in dbase, process in another worker process (ex: windows service), and deliver the result to the requestor (ex: by email)
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 4, 2013 8:07 AM