File processing timeout

Last post 05-14-2008 11:07 AM by Jeev. 8 replies.

Sort Posts:

  • File processing timeout

    05-14-2008, 9:20 AM

    Hi All

    I have a web service that looks in a particular folder grabs each file (a jpeg image between 1-2 mb ) and writes it out as 4 other files (different sized images, thumbnails etc) to another folder. The problem is that the initial drop folder where the web service picks up the images can contain up to 5000 image files each between 1-2 mb each, the web service processes about 80 of these image files successfully and then times out after 2 minutes with the message:

    "Http Exception - Request timed out"

    So my question is why is this web service timing out? The actual file manipulation code obviiously works as it processes 80 fine.

    For your information, the Website, within which this web service lies has a connection time out set to 120 seconds in IIS. Would increasing this timeout affect anything? Or is it likely to be an issue with the code in that it is processing too slowly?

    Your initial thoughts are much appreciated

    Cheers
    John
     


     

    JD
    Web Monkey
  • Re: File processing timeout

    05-14-2008, 10:05 AM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 2,304

    Are you uploading the file via the webservice ? If not and you are just processing the files that exist on the server then you should be looking at a windows service

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: File processing timeout

    05-14-2008, 10:20 AM

    Yes sorry, forgot to mention that bit. I have a windows service that checks the folders for new files, it then calls the web service to perform the file manipulation stuff. 

    JD
    Web Monkey
  • Re: File processing timeout

    05-14-2008, 10:23 AM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 2,304

     I may have totally misunderstood your need, but I am unable to understand the need for a web service? shouldn't the windows service be doing all the  file manipulation stuff

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: File processing timeout

    05-14-2008, 10:38 AM

     Possibly, but I have inherited this particular code. Altering the main way it works (Windows service calling web service) is not an option at the moment. I can fully understand that this is not the ideal way to do the task (the project I'm involved in is a bit of a joke so it doesn't surprise me), but that's the way it is and unfortunately I need to fix it. So if you can put the obvious mis-givings of the functionality to one side that would be marvellous :)

     So any ideas?
     

    JD
    Web Monkey
  • Re: File processing timeout

    05-14-2008, 10:48 AM
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 2,304

     Sorry to go wander off on a different route.I was just trying to understand your situation, but yes try increasing the time out and you should see a jump in the number of files being processed.That should help you judge and decide on an appropriate number depending on the number of files you would have in the folder

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: File processing timeout

    05-14-2008, 10:56 AM

    No worries :)

    So is that just changing the connection timeout in IIS? Do I need to add any timeout settings to the config file, such as <httpRuntime executionTimeout="600"/>

    Also, is there a maximum you can set this timeout to in IIS? 

    JD
    Web Monkey
  • Re: File processing timeout

    05-14-2008, 11:01 AM
    Answer
    • Loading...
    • mailathere
    • Joined on 05-12-2008, 2:14 PM
    • Posts 8

    You can use this setting. 

    <httpRuntime executionTimeout="600"/>

     but don't make this in your machine.config file. If you want to enable this setting in your only one application set this in web.config fie. I hope this will solve your problem.

    Thanks. 

  • Re: File processing timeout

    05-14-2008, 11:07 AM
    Answer
    • Loading...
    • Jeev
    • Joined on 11-24-2005, 7:49 AM
    • Posts 2,304

     I'd rather do it in the config file Don;t think there is a max, but I'd put a reasonable limit there

    http://msdn.microsoft.com/en-us/library/e1f13641.aspx 

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
Page 1 of 1 (9 items)