Asp.net web api ravendb上不存在超时索引

Asp.net web api ravendb上不存在超时索引,asp.net-web-api,nservicebus4,Asp.net Web Api,Nservicebus4,tl;博士: 我的web api服务运行缓慢,添加了日志记录 日志记录给了我无法找到超时的错误 在服务器上没有看到webapi项目的ravendb数据库,但开发人员机器上有它 瑞文在8080上跑啊跑 尝试通过平台安装程序重新安装nservicebus(昨天从nservicebus下载) 还有同样的问题吗 我想我要么把部署搞砸了,要么我需要以某种方式进行干净的安装 我需要做什么才能让webapi项目读取超时? 我正试图让我们的应用程序在生产机器上运行,为alpha做准备。 我们的应用程序有多个

tl;博士:

  • 我的web api服务运行缓慢,添加了日志记录
  • 日志记录给了我无法找到超时的错误
  • 在服务器上没有看到webapi项目的ravendb数据库,但开发人员机器上有它
  • 瑞文在8080上跑啊跑
  • 尝试通过平台安装程序重新安装nservicebus(昨天从nservicebus下载)
  • 还有同样的问题吗
  • 我想我要么把部署搞砸了,要么我需要以某种方式进行干净的安装
  • 我需要做什么才能让webapi项目读取超时?
我正试图让我们的应用程序在生产机器上运行,为alpha做准备。
我们的应用程序有多个web api站点和许多服务主机

我看到的错误目前仅在生产环境中的web api主机中:

这会重复一段时间。最终(大约2分钟)端点放弃并死亡

2014-08-06 01:57:03,645 [17] WARN  NServiceBus.CircuitBreakers.RepeatedFailuresOverTimeCircuitBreaker [(null)] - The circuit breaker for TimeoutStorageConnectivity will now be triggered
2014-08-06 01:57:03,645 [17] FATAL NServiceBus [(null)] - Repeated failures when fetching timeouts from storage, endpoint will be terminated.
System.InvalidOperationException: There is no index named: dynamic/TimeoutData
我通过为nservicebus启用log4net文件appender来获取这些日志,以了解web api服务的运行情况

主机服务在我们的开发机器上工作得很好,但由于某些原因,它们在生产机器上的速度非常慢。我们在开发机器上看不到错误。我们在生产机器上安装了许可证,所以我们不会因为许可证过期而受到限制

奇怪的是,在我们的开发机器上,我们可以看到web api项目的数据库,但在生产机器上,只有安装的服务主机有数据库条目

我们已经为这个特定的应用程序开发了大约18个月。可能是当我们安装nservicebus时,没有设置超时。但是,我已经尝试运行平台安装程序(昨天下载),但超时仍然不存在。我假设当我安装服务主机时,超时会被设置为需要安装,但由于某种原因,它们不会出现

在这一点上,我正在考虑不稳定的nservicebus和ravendb,但我不确定如何重新安装

以下是我的global.asax中的一些相关内容

        IContainer container = IoC.Initialize();
        DependencyResolver.SetResolver(new StructureMapDependencyResolver(container));
        GlobalConfiguration.Configuration.DependencyResolver = new StructureMapDependencyResolver(container);

        Configure.Transactions.Enable();
        Configure.Serialization.Json();

        Configure.With()
            .DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains(".Events"))
            .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.Contains(".Commands"))
            .StructureMapBuilder(container)
            .Log4Net()
            .UseTransport<Msmq>()
            .UnicastBus()
            .CreateBus()
            .Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
IContainer容器=IoC.Initialize();
SetResolver(新结构MapDependencyResolver(容器));
GlobalConfiguration.Configuration.DependencyResolver=新结构MapDependencyResolver(容器);
Configure.Transactions.Enable();
Configure.Serialization.Json();
用()配置
.DefiningEventsAs(t=>t.Namespace!=null&&t.Namespace.Contains(“.Events”))
.DefiningCommandsAs(t=>t.Namespace!=null&&t.Namespace.Contains(“.Commands”))
.StructureMapBuilder(容器)
.Log4Net()
.UseTransport()
.UnicastBus()
.CreateBus()
.Start(()=>Configure.Instance.ForInstallationOn().Install());

您的生产环境中似乎没有安装Raven

有关安装说明,请参阅


HTH要解决此问题,请执行以下步骤

  • 打开RavenDB控制面板,通常位于
  • 选择端点的数据库
  • 转到“索引”选项卡
  • 单击“删除所有索引”

一旦启动服务端点,将立即重新创建索引。

Raven正在我的生产机器上运行,正如我在OP中所指出的,我看到的是nservicebus主机服务的主机数据库,而不是webapi服务的主机数据库。Raven在web api服务的机器上运行的端口是什么?它们都在同一台机器上运行吗?您正在运行哪个版本的NServiceBus?你手边有端点启动日志吗?这对我来说不再是问题,因为我升级到NSB 5并使用mongo db而不是raven。在进行切换之前,我们认为可能是权限问题。
        IContainer container = IoC.Initialize();
        DependencyResolver.SetResolver(new StructureMapDependencyResolver(container));
        GlobalConfiguration.Configuration.DependencyResolver = new StructureMapDependencyResolver(container);

        Configure.Transactions.Enable();
        Configure.Serialization.Json();

        Configure.With()
            .DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains(".Events"))
            .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.Contains(".Commands"))
            .StructureMapBuilder(container)
            .Log4Net()
            .UseTransport<Msmq>()
            .UnicastBus()
            .CreateBus()
            .Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());