HttpHander in a mapper

Discussion in 'ASP .Net' started by Flip Rayner, Jan 21, 2007.

  1. Flip Rayner

    Flip Rayner Guest

    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/
    Flip Rayner, Jan 21, 2007
    #1
    1. Advertising

  2. 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/prodtechnol/windowsserver2003/library/IIS/
    a8c5b994-7722-4dc6-a246-7dfe667c6816.mspx)?


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


    Sincerely,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    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/subscriptions/support/default.aspx.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Jan 22, 2007
    #2
    1. Advertising

  3. Flip Rayner

    Flip Rayner Guest

    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 JasonsMapperAccount 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/
    Flip Rayner, Jan 23, 2007
    #3
  4. Flip Rayner

    Flip Rayner Guest

    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]
    <> wrote:

    > 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 "Performance" tab, there's a setting in "Web
    > garden"
    > part called "Maximum number of worker processes".
    >
    > Regards,
    > Walter Wang (, 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/
    Flip Rayner, Jan 25, 2007
    #4
  5. 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 (, 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.
    Walter Wang [MSFT], Jan 26, 2007
    #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. Flare
    Replies:
    8
    Views:
    651
    Sayed Hashimi
    Sep 24, 2004
  2. MyGeneration
    Replies:
    0
    Views:
    410
    MyGeneration
    Jan 25, 2005
  3. Deepak Nayal

    JDO or O/R Mapper ?

    Deepak Nayal, Feb 3, 2004, in forum: Java
    Replies:
    5
    Views:
    448
    Silvio Bierman
    Feb 12, 2004
  4. JavaEnquirer

    Java Data Mapper

    JavaEnquirer, Feb 28, 2006, in forum: Java
    Replies:
    5
    Views:
    1,183
    James McGill
    Feb 28, 2006
  5. Andrew Bourne
    Replies:
    0
    Views:
    733
    Andrew Bourne
    Jan 12, 2009
Loading...

Share This Page