Skip to content

Loading…

Occasional unhandled exception on AppHarbor #7

Closed
cbsmith402 opened this Issue · 9 comments

2 participants

@cbsmith402

I'm occasionally getting this exception in my AppHarbor site:
[InvalidOperationException: The behavior of the AppHarbor loadbalancer changed, it no longer specifies the HTTP_X_FORWARDED_FOR header]
at Premotion.AspNet.AppHarbor.Integration.AppHarborModule.<>c__DisplayClass1.b__0(Object sender, EventArgs args) in C:\inetpub\wwwroot\PremotionAspNetAppHarborIntegration\src\Premotion.AspNet.AppHarbor.Integration\AppHarborIntegrationModule.cs:line 89
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

@devatwork
Owner

Hi Chris, Thanks for reporting this issue, I am investigating now.

@devatwork
Owner

Hmm, according to this http://support.appharbor.com/kb/getting-started/information-about-our-load-balancer the implementation is correct.

Chris, could you please elaborate a bit more about how often this issue occures and if there is a pattern to it? Maybe send a list of all the exception with their timestamp?

Thanks in advance for your info!

@cbsmith402

There's doesn't seem to be a pattern to it. It's happened on two totally different pages at different times. I'll keep an eye on it to see if it happens more. I'll also check with AppHarbor to see if it's an issue on their end.

@devatwork
Owner

Weird, it could be an infrastructure thing at AppHarbor, maybe an misconfigured nginx instance or something.

Please let me know if you learn more.

@cbsmith402

OK, I've been able to reliably reproduce the issue. It happens whenever there is a HTTP 500 error on the site. I added some custom error pages to my site and I have a controller that intentionally generates an error to test them. On my local machine I get the custom error page as expected, but on AppHarbor I get this error every time.

You can see it here: http://solvora.apphb.com/Home/IntentionalError

@devatwork
Owner

Hi Chris, thanks for reproducing this error!

I will investigate and publish a bugfix as soon as possible.

@devatwork devatwork added a commit that referenced this issue
@devatwork + using 404 to reproduce #7 7060196
@devatwork devatwork added a commit that referenced this issue
@devatwork #7 fighting web.config 6229f5f
@devatwork devatwork added a commit that referenced this issue
@devatwork Candidate fix for #7 ca425b8
@devatwork
Owner

Hi Chris,

After having a few fights with iis and the httpErrors element I managed to reproduced the problem properly.

I have committed a bugfix in the master branche and I have updated the test application.

Would you please be so kind and test the bugfix in your application before I update the NuGet package?

Thanks in advance!
Bert

@cbsmith402

It looks like that fixed it! I republished my app with the new build and it shows the custom error page as it should: http://solvora.apphb.com/Home/IntentionalError

Thanks!

@cbsmith402 cbsmith402 closed this
@devatwork
Owner

Fixed in version 0.4.0, now available on NuGet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.