HttpHander in a mapper

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Flip Rayner

    HttpHander in a mapper

    Hi,

    We are creating a URL mapper that translates from one URL (yucky - badly
    formatted), to a nicely formatted URL. The mapper acts as a proxy type
    website above the source website, processing all incoming requests (in
    nice URL format) and working out the appropriate source URL to request the
    content on.

    We are using the HTTPHandler object to intercept all webrequests, and
    perform sub requests to the old website to retrieve the data to display
    under the nice URL. We are finding that the mapper website is failing
    after about 30minutes to 1 hour. The website mapper appears after a period
    of time to return completely blank pages. Recycling the app pool fixed the
    problem, but only for another 30 - 60 minutes. The w3wp.exe does not
    appear to be using undue CPU, nor does the memory usage seem high or
    excessive.

    Has anyone else had similar problems with the HTTPHandler object? Is there
    a timeout in the httpHandler that we need to be aware of?

    Thanks,
    --
    Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
  • Walter Wang [MSFT]

    #2
    RE: HttpHander in a mapper

    Hi Flip,

    Based on my understanding, you've created a custom IHttpHandler to
    intercept web request and map URL to old website. The handler currently
    will stop working after about 30-60 minutes by simply returning blank
    pages. Please correct me if I've misunderstood anything.

    To troubleshoot such issue, I would suggest you to check following points
    first:

    1) When the issue occurs, does other normal web form that isn't using the
    handler still work? A normal web form is also a http handler, by
    determining this, we could know if it's just the http handler stopped
    working or the entire web site.

    2) Have you inspected the IIS log
    (http://www.iisfaq.com/Default.aspx?tabid=2550)?

    3) Have you tried to use performance counter to monitor the web site
    (http://www.microsoft.com/technet/pro...3/library/IIS/
    a8c5b994-7722-4dc6-a246-7dfe667c6816.ms px)?


    Please feel free to let me know if there is anything unclear.


    Sincerely,
    Walter Wang (wawang@online. microsoft.com, remove 'online.')
    Microsoft Online Community Support

    =============== =============== =============== =====
    Get notification to my posts through email? Please refer to
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

    ications. If you are using Outlook Express, please make sure you clear the
    check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
    promptly.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscripti...t/default.aspx.
    =============== =============== =============== =====

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Comment

    • Flip Rayner

      #3
      Re: HttpHander in a mapper

      Hi Walter,

      As we get further into the problem it grows more mysterious. The website
      does not completely stop responding, but some pages time out. Retrying
      them for long enough seems finally return the desired content. Also having
      multiple browser windows open I find that one session may have become
      really slow loading / timed out, while the others are still going fine.
      Often someone else will report a problem/timeout - while I have no problem
      going to the same page. Sometimes they are in the same office on the same
      internet connection.

      I believe you have understood the problem, though it is now apparent not
      all pages time out.

      The next interesting thing is I have now created an entirely seperate
      Application Pool for the application, and given it an independent username
      to run under. When I go to the processes tag in Task Manager it reports 3
      (and sometimes 4) W3wp.exe running under the JasonsMapperAcc ount username.
      Why are there 3 worker processes being spawned for the HTTP handler?
      Normally for most .Net web projects we have one W3wp.exe per website.

      We have implemented basic performance counters on the web-server, but not
      ones specifically for IIS.

      I will run an analysis of the logs to see if that yeilds any information
      also.

      cheers.

      --
      Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

      Comment

      • Walter Wang [MSFT]

        #4
        Re: HttpHander in a mapper

        Hi Flip,

        Are all your pages handled by the custom http handler? When you mean "not
        all pages time out", which exact pages are not time out?

        For the worker process count, I think there's a setting in the AppPool's
        properties: check the "Performanc e" tab, there's a setting in "Web garden"
        part called "Maximum number of worker processes".

        Regards,
        Walter Wang (wawang@online. microsoft.com, remove 'online.')
        Microsoft Online Community Support

        =============== =============== =============== =====
        When responding to posts, please "Reply to Group" via your newsreader so
        that others may learn and benefit from your issue.
        =============== =============== =============== =====

        This posting is provided "AS IS" with no warranties, and confers no rights.

        Comment

        • Flip Rayner

          #5
          Re: HttpHander in a mapper

          Hi Walter,

          We got to the bottom of the problem in the end.
          There were a few things to consider.
          1. We had 3 W3WP.exe's running, so when one would go down, the others
          would keep working. Some pages wouldn't work as they would get connected
          to the broken W3WP.
          2. In our sub requests to the REAL website, we weren't correctly closing
          the HTTP Request. For some reason this seemed to be fine, and the request
          could be re-used UNTIL a time-out happened. Once that happened that thread
          would die. After all threads on a W3WP died, it would no longer server up
          URLs correctly.

          We have since changed the number of W3WP's down to 1 as we don't need any
          more in our web garden.

          Thanks for your help,

          Flip


          On Wed, 24 Jan 2007 03:55:47 +1300, Walter Wang [MSFT]
          <wawang@online. microsoft.comwr ote:
          Hi Flip,
          >
          Are all your pages handled by the custom http handler? When you mean "not
          all pages time out", which exact pages are not time out?
          >
          For the worker process count, I think there's a setting in the AppPool's
          properties: check the "Performanc e" tab, there's a setting in "Web
          garden"
          part called "Maximum number of worker processes".
          >
          Regards,
          Walter Wang (wawang@online. microsoft.com, remove 'online.')
          Microsoft Online Community Support
          >
          =============== =============== =============== =====
          When responding to posts, please "Reply to Group" via your newsreader so
          that others may learn and benefit from your issue.
          =============== =============== =============== =====
          >
          This posting is provided "AS IS" with no warranties, and confers no
          rights.
          >


          --
          Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

          Comment

          • Walter Wang [MSFT]

            #6
            Re: HttpHander in a mapper

            Hi Flip,

            I'm glad to know that you've found the cause of the issue. Let me know if
            you need anything else. Thanks.

            Regards,
            Walter Wang (wawang@online. microsoft.com, remove 'online.')
            Microsoft Online Community Support

            =============== =============== =============== =====
            When responding to posts, please "Reply to Group" via your newsreader so
            that others may learn and benefit from your issue.
            =============== =============== =============== =====

            This posting is provided "AS IS" with no warranties, and confers no rights.

            Comment

            Working...