site down " No database instance"

1 month ago
Hello I was updating some order in admin suddenly scree froze and site is down since then, here is what it reads  on the screen:

Server Error in '/' Application.
No database instance
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.ApplicationException: No database instance
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[ApplicationException: No database instance] Nop.Data.Initializers.CreateTablesIfNotExist`1.InitializeDatabase(TContext context) +710 System.Data.Entity.Internal.<>c__DisplayClassf`1.<CreateInitializationAction>b__e() +76 System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +60 System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +357 System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c) +7 System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +110 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +198 System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() +73 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +28 System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +53 System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15 System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +38 System.Linq.Queryable.OrderBy(IQueryable`1 source, Expression`1 keySelector) +83 Nop.Services.Stores.StoreService.<GetAllStores>b__8_0() +157 Nop.Core.Caching.CacheExtensions.Get(ICacheManager cacheManager, String key, Int32 cacheTime, Func`1 acquire) +93 Nop.Services.Stores.StoreService.GetAllStores() +62 Nop.Web.Framework.WebStoreContext.get_CurrentStore() +75 Nop.Web.Framework.<>c__2`1.<BuildRegistration>b__2_0(IComponentContext c, IEnumerable`1 p) +35 Autofac.Builder.<>c__DisplayClass0_0`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p) +14 Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +32 Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +66 [DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +183 Autofac.Core.Resolving.InstanceLookup.<Execute>b__5_0() +8 Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +120 Autofac.Core.Resolving.InstanceLookup.Execute() +116 Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration regist Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +64 Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters) +109 Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) +54 Autofac.ResolutionExtensions.Resolve(IComponentContext context, IEnumerable`1 parameters) +102 Autofac.ResolutionExtensions.Resolve(IComponentContext context) +75 Nop.Core.Infrastructure.DependencyManagement.ContainerManager.Resolve(String key, ILifetimeScope scope) +91 Nop.Core.Infrastructure.NopEngine.Resolve() +69 FoxNetSoft.Plugin.Misc.DiscountOrder.UpdateStartUpTask.Execute() +173 Nop.Core.Infrastructure.NopEngine.RunStartupTasks() +468 Nop.Core.Infrastructure.NopEngine.Initialize(NopConfig config) +48 Nop.Core.Infrastructure.EngineContext.Initialize(Boolean forceRecreate) +98 Nop.Web.MvcApplication.Application_Start() +66 [HttpException (0x80004005): An error occurred during the activation of a particular registration. See the inner exception for details. R System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10107111 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +123 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +181 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +228 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +314 [HttpException (0x80004005): An error occurred during the activation of a particular registration. See the inner exception for details. R
5/11/2021 No database instance
https:/
1 month ago
need help ASAP, contact me if you can help me solve this problem.
1 month ago
Do you have access to any of your server's management tools outside of nopCommerce?  If you're on shared hosting you should be able to start a ticket and they'll take a look.  

I suspect your database server needs a swift kick, but how we do that depends on your setup.
1 month ago
See if anything here helps
https://www.nopcommerce.com/en/boards/topic/26946/no-database-instance

Are you able to connect to your database externally?  SSMS?  Host's online 'SQL console'?
1 month ago
Thanks for the replies, that was a hosting server problem, they fixed!
Thanks Again,