RewriteProxy timeout - capture error?

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

RewriteProxy timeout - capture error?

17 Dec 2012, 15:20

We are using RewriteProxy to pull in html from a remote server. This works great as long as the remote site is up. If the remote site has an error, ISAPI_Rewrite handles this great as well and passes it through. The problem is arising when the remote proxy server is down completely. In this case, the RewriteProxy is returning a 200 status code and a blank page. This isn't great as I'd much rather have an error page returned so that it is not cached by search engines and such.

Can we capture that a timeout has occured fromt he RewriteProxy request or is there a way for the RewriteProxy to send a 500 or something instead of the 200 when the requested site is down?

We use a map to map hostname to proxy location, otherwise pretty simple.

Rules:

<Helicon>
ProxyConnectTimeout 60
ProxySendTimeout 30
ProxyReceiveTimeout 30
ProxySuppressErrors Off
</Helicon>

RewriteMap hostmap txt:hostnames.txt [NC]
RewriteCond %{HTTP:Host} ^(www\.)?(.*) [NC]
RewriteProxy (/.*\.htm.*) ${hostmap:%2}$1 [H, A]

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: RewriteProxy timeout - capture error?

18 Dec 2012, 08:49

Hello,

First please make sure you are using the latest build of ISAPI_Rewrite available. If it's still the case with the latest build, please clarify what you is meant by "completely down". What response does the back-end return? We need to understand the details to be able to reproduce the issue and fix it if possible.

User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

Re: RewriteProxy timeout - capture error?

18 Dec 2012, 16:23

Hi Anton, yes I just did upgrade to the latest build so we should be good in that regard.

Well, there is no response at all. Typically if your webserver is having a problem or something it may return a status code, but in this case, perhaps the server is completely offline.

A quick test on your end is to just setup a rewriteproxy to an invalid IP or port with nothing on it.

Thanks for your time I would love to see something come out of this for those rare times when our proxied server crashes hard.

Thanks!

User avatar
Posts: 27
Joined: 04 Dec 2012, 21:06

Re: RewriteProxy timeout - capture error?

19 Dec 2012, 21:36

What exactly is the latest build available?

User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

Re: RewriteProxy timeout - capture error?

19 Dec 2012, 22:57

ISAPI_Rewrite3_0095

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: RewriteProxy timeout - capture error?

20 Dec 2012, 11:03

Hello,

We've fixed the proxy behavior in the latest build - 96.
Please update.

User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

Re: RewriteProxy timeout - capture error?

24 Dec 2012, 16:18

Great guys, it appears to be working with an error now. I really apprecaite it!

User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

Re: RewriteProxy timeout - capture error?

11 Jul 2013, 14:21

Hi guys,

This has been working well but we're troubleshooting an issue to where Helicon is returning 500's on the proxy randomly to some client traffic.

When the proxy returns a 500, is there a way we can setup Helicon to log this? Right now we have our IIS trace logs that point to it getting to the HeliconProxy DLL but I don't have any log errors on the Helicon Side. I'd prefer something that can log these proxy errors only without having it buried in the full logging so I can use it in a Production environment.

User avatar
Posts: 18
Joined: 17 Dec 2012, 14:43

Re: RewriteProxy timeout - capture error?

17 Jul 2013, 15:01

Any ideas? Looking to separate out proxy errors if possible.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 3 guests