HttpHander in a mapper

F

Flip Rayner

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,
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 
F

Flip Rayner

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.
 
F

Flip Rayner

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
 
W

Walter Wang [MSFT]

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 ([email protected], 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top