问题
tl;dr:
- my web api service is running slow, added logging
- logging is giving me errors about not being able to find timeouts
- didn't see the ravendb database for the webapi project on the server, but dev machines have it
- raven is running and running on 8080
- tried reinstalling nservicebus via platform installer(downloaded from nservicebus yesterday)
- still have the same issue
- i think i either messed up the deployment or I need to do a clean install somehow
- What do I need to do in order for the webapi project to read the timeouts?
I'm trying to get our application working on a production machine in preparation for an alpha.
Our application has multiple web api sites and many service hosts.
The errors I'm seeing are currently in the web api host on production only:
2014-08-06 01:55:24,789 [52] DEBUG NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver [(null)] - Polling for timeouts at 08/06/2014 01:55:24.
2014-08-06 01:55:24,793 [46] WARN NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver [(null)] - Failed to fetch timeouts from the timeout storage
This gets repeated awhile. Eventually (about 2 minutes) the endpoint gives up and just dies
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
I'm getting these logs by enabling log4net file appender for nservicebus to figure out whats going on with the web api services.
The host services work fine on our dev machines, but for some reason they're really slow on the production machines. We don't see the errors on our dev machines. We have the licenses installed on the production machines so its not like we're being throttled by an expired license.
The weird thing is that on our dev machines we see the database for our web api projects, but on the production machines, only the installed service hosts have database entries.
We've been in dev for this particular application for about 18 months. It could be that when we installed nservicebus, the timeouts were not set to be installed. However, I have tried running the platform installer (downloaded yesterday) and the timeouts are still not present. I'm assuming that when I install the service host, the timeouts are stupposed to be installed then, but they're not showing up for some reason.
At this point I'm contemplating uninstaling nservicebus and ravendb, but i'm not sure how to go about getting a clean reinstall.
Here's some relevant lines from my 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());
回答1:
To fix this, perform the following steps
- Open the the RavenDB control panel, usually located at http://RAVEN_DB_SERVER:8080
- Select the database of your endpoint
- Go to Indexes tab
- Click at Delete All Indexes
The indexes will be recreated as soon as the service endpoint is started.
回答2:
It looks like Raven is not installed in your production environment.
For install instructions please take a look here
HTH
来源:https://stackoverflow.com/questions/25154339/timeout-index-not-present-on-ravendb