Comments (8)
I have a Pull Request (#14), but I'm worried that this duct-tapes something fundamental on initial RunAsync(). Please let me know your thoughts.
from service-fabric-distributed-cache.
Thanks @Ryanman. We will look at your pull request and let you know what we think.
from service-fabric-distributed-cache.
I see the PR was approved. I'd like us to keep this issue open until I'm able to report back that a) this solves the issue and b) that the cache is able to recover from being replicated. With the time this is occurring it may be a day or two.
If we're doing something wrong to cause this hopefully I'll have info for that as well.
from service-fabric-distributed-cache.
Sounds good. I was able to get the error in my local testing when I set the MaxCacheSizeInMegabytes be a negative value so that I could get all cached items to all be removed. With your fix this does not happen even if the MaxCacheSizeInMegabytes is set to a negative value.
from service-fabric-distributed-cache.
Hey all - Ran some tests last night. Our two different environments encountered the issue around 6 hours after our deployment and test. This is also the length of our longest sliding expiration.
Are y'all able to push the latest update to NuGet relatively soon? There's a chance we'll uncover another issue with some of the data we're putting in with the long sliding expiration, but to be frank we've been loading and retrieving those items for a while now before the issue began. Perhaps there's other changes we've made that have indirectly caused the deletion of expired items to bomb out.
Time | Log Scope | Event |
---|---|---|
3:21:32 | Release | Smoke Test Succeeded |
9:23:36 | Operational | Transient Fault detected for Cache node EventName: ApiReportFaultOperational Category: StateTransition ActivityId: 0e08b908-f83d-463c-ae1e-8cd63b7c8923:0 PartitionId: {267b4330-42f9-4b0c-b1be-b5e9bec824c7} FaultType: Transient NodeId: a3784be1d81710242ed0a9632647b4f7 ReplicaId: 132386231100152448 ReplicaInstanceId: 132386231100152448 EventInstanceId: {2f95758e-7536-4cb5-80f0-555a3ad4dfc9} |
9:23:37 | Application | First Failure in App |
9:23:37 | Admin | ServiceHostProcess: XXX.DistributedCache.exe started at 2020-07-07T19:19:22.580147200Z with Process Id 4860 for ApplicationId 692c6b8d-f7e5-44f1-b69c-938a8c9af749 terminated unexpectedly with exit code 255 on node id a3784be1d81710242ed0a9632647b4f7 |
9:23:39 | Operational | Failover 1 Completed |
9:23:42 | Admin | Data Loss Reported |
from service-fabric-distributed-cache.
Shifted our longest expiration time to 5 hours instead of six, Failures occurred after 5 hours instead of 6. So this is relatively confirmed to occur when the cache is emptied during long periods of inactivity.
from service-fabric-distributed-cache.
Sorry I thought your PR already went through and Nuget package was pushed but it looks like your test is failing the build:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack trace
at SoCreate.Extensions.Caching.ServiceFabric.LinkedDictionaryHelper.AddLast(CacheStoreMetadata cacheStoreMetadata, String cacheItemKey, CachedItem cachedItem, Byte[] newValue) in /home/vsts/work/1/s/src/SoCreate.Extensions.Caching.ServiceFabric/LinkedDictionaryHelper.cs:line 77
at SoCreate.Extensions.Caching.ServiceFabric.DistributedCacheStoreService.<>c__DisplayClass20_0.<<SetCachedItemAsync>b__0>d.MoveNext() in /home/vsts/work/1/s/src/SoCreate.Extensions.Caching.ServiceFabric/DistributedCacheStoreService.cs:line 136
--- End of stack trace from previous location where exception was thrown ---
at SoCreate.Extensions.Caching.ServiceFabric.RetryHelper.<>c__DisplayClass4_0.<<ExecuteWithRetry>b__0>d.MoveNext() in /home/vsts/work/1/s/src/SoCreate.Extensions.Caching.ServiceFabric/RetryHelper.cs:line 72
--- End of stack trace from previous location where exception was thrown ---
at SoCreate.Extensions.Caching.ServiceFabric.RetryHelper.ExecuteWithRetry[TResult](Func`3 operation, Object state, CancellationToken cancellationToken, Int32 maxAttempts, Nullable`1 initialDelay)
at SoCreate.Extensions.Caching.ServiceFabric.RetryHelper.ExecuteWithRetry(IReliableStateManager stateManager, Func`4 operation, Object state, CancellationToken cancellationToken, Int32 maxAttempts, Nullable`1 initialDelay) in /home/vsts/work/1/s/src/SoCreate.Extensions.Caching.ServiceFabric/RetryHelper.cs:line 83
at SoCreate.Extensions.Caching.ServiceFabric.DistributedCacheStoreService.SetCachedItemAsync(String key, Byte[] value, Nullable`1 slidingExpiration, Nullable`1 absoluteExpiration) in /home/vsts/work/1/s/src/SoCreate.Extensions.Caching.ServiceFabric/DistributedCacheStoreService.cs:line 105
at SoCreate.Extensions.Caching.Tests.DistributedCacheStoreServiceTest.RemoveCachedItemAsync_RemoveItemsFromLinkedDictionary_RemovalWorksWithMalformedMetadata(Mock`1 stateManager, Mock`1 cacheItemDict, Mock`1 metadataDict, ServiceFabricDistributedCacheStoreService cacheStore) in /home/vsts/work/1/s/tests/SoCreate.Extensions.Caching.Tests/DistributedCacheStoreServiceTest.cs:line 343
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
from service-fabric-distributed-cache.
That's embarassing - my apologies. I got all the test to pass, then "Cleaned up" before opening the PR, with the cachedItems object not having direct follow-up references in the test.
Re-added the necessary memory store setup call: #16
In other news we tested the new code by temporarily adding the package as a project, and the problem appears to be solved in our lower environments.
from service-fabric-distributed-cache.
Related Issues (20)
- Support for Rate Limiting functionality HOT 1
- Facing an exception in stateful service constructor in sample code System.IO.FileNotFoundException HOT 2
- TimeoutException on SetAsync() HOT 9
- MaxCacheSizeInMegabytes with HasPersistedState = true HOT 4
- Correct usage HOT 1
- Running in docker container
- Getting "System.Fabric.FabricServiceNotFoundException: Service does not exist." on SetAsync HOT 2
- Unable to cast object of type 'System.Fabric.SingletonPartitionInformation' to type 'System.Fabric.Int64RangePartitionInformation' HOT 5
- Any reason why IDistributedCacheStoreLocator is not public?
- Any reason there is no option to get all stored keys or remove all stored keys within a cache store?
- I was trying to use socreate libraray for caching .Im getting Could not ping any of the provided Service Fabric gateway endpoints. error even after providing the endpoints. Any insights
- Support configure FabricTransportRemotingListenerSettings for authentication HOT 3
- Monitoring HOT 2
- Publish v2.3.0
- Publish v3.2.0 HOT 2
- unexplained cache failure after some time HOT 1
- High latency happens HOT 1
- .net framework support
- Service Fabric Depenencies locked to specific patch versions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from service-fabric-distributed-cache.