2

I have an intermittent issue with Yet Another Forum.NET where the forums just go down. It's usually at least a week between occurrences, usually more. The last for the site happened 30th April, then just again 29th May (quite a big gap this time, maybe due to me proactively restarting the website in order to avoid occurrences while I'm away and offline and so unable to fix the issue immediately). The issue always goes away when the website is restarted.

I'm running YAF 1.9.6.1 and the error I get is:

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Thread was being aborted.

Source Error:


Line 157: <providers>
Line 158: <clear />
Line 159: <add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider" />
Line 160: </providers>
Line 161: </membership>


Source File: D:\Inetpub\ftproot\MW\paydirt\www.paydirt.co.nz\web.config Line: 159

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

In case it has any bearing...

  • The YAF forum is side-by-side within the same site as a Composite C1 CMS based site - www.paydirt.co.nz.
  • The main CMS based site never goes down, only the YAF forum pages (in fact I use the CMS's "Restart Server" tool to bring the forums back up).
  • The site is on a shared hosting plan, the exact server setup details I'm unaware of but IIS 6 is used and I suspect some sort of server farm.
  • There sees to be a time component involved as it always happens quite sometime after a website restart. So I've been proactively restarting the website to stall the issue.

I'd be grateful to hear any advice / ideas about what might be causing this as it's been going on for quite some time now. The forums have a nasty habit of mainly going down when I'm away for a weekend and offline.

Thanks in advance for any help, Gavin

Gavin
  • 5,629
  • 7
  • 44
  • 86
  • Without knowing anything (at all) about YAF, this sounds like a problem with recycling of threads/appdomains/processes (which happens in ASP). There is probably something running in YAF that doesn't like the fact that a thread is aborted at random, and throws a tantrum. But as said, just a guess. – Alxandr Jun 08 '13 at 21:28
  • Thanks Alxandr - much appreciated. Was hoping it would be something I didn't need to delve in to the code of YAF for, but perhaps I should start delving in to the code for YafMembershipProvider! – Gavin Jun 09 '13 at 05:10
  • This has become an even bigger issue now I've upgraded to YAFNET 2.0.0 – Gavin Nov 24 '13 at 01:46
  • Seems this is the same issue as reported here- http://stackoverflow.com/questions/2218789/configurationerrorsexception-thread-was-being-aborted-on-membership-provider – Gavin Nov 24 '13 at 06:12
  • Committed a fix: https://github.com/YAFNET/YAFNET/issues/62 – Jaben Nov 26 '13 at 02:11
  • Thanks Jaben - that fix seems to have resolved the issue for me. Very much appreciated! – Gavin Nov 27 '13 at 09:22
  • @Jaben - feel free to post an answer here with an overview of what caused the issue and how it was fixed, then I'll mark it as the correct answer. Might help others with similar issue. – Gavin Dec 04 '13 at 00:49

1 Answers1

0

The issue was YAF.NET's global use of the HttpApplication for holding connection strings. In retrospect, HttpApplication is poor place to store singleton instances of configuration data. Occasionally, there were collisions and failures.

The fixes committed: https://github.com/YAFNET/YAFNET/commit/163e0c016087d4c2b8b625d807ce0b1eaa417195

Use a global ConcurrentDictionary instead of HttpApplication for storing the connection strings for the membership providers.

Jaben
  • 426
  • 3
  • 9