Cofoundry is an unobtrusive ASP.NET Core CMS focused on code-first development and user-friendly content management. Run integrated, decoupled or headless, it's your choice.
Is there any documentation on how to use as a headless CMS? I've found this sample so far, but no docs on it.
@HeyJoel, have you been running Cofoundry on ASP.NET Core 3.1 for a while now? We've been running a staging environment but at some point between 24 and 96 hours our application is depleting it's SQL connection pool it seem with this error message:
System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
at Microsoft.Data.Common.ADP.ExceptionWithStackTrace(Exception e)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
This also happens with an application that's not really being used, and it didn't before on .NET Core 2.2. Any clues?
ErrorLogging
plugin?Thanks @technical2cents for letting us know. The group by is required for the correct stats, but EF doesn't work well with GroupBy anymore. The fixed query should be:
queryModel.NumPages = await _dbContext
.PageVersions
.AsNoTracking()
.Where(v => v.PageTemplateId == query.PageTemplateId)
.Select(v => v.Page)
.Distinct()
.CountAsync();
I've committed the fix, thank you!
IAuthConfiguration
and the docs for DI tell you how to override stuff. If you need to inject anything into the startup pipeline the docs for that are here