I got a service that uses ServiceStack.Redis for storing objects (serialized with JSON). There's a key that's updated with each HTTP request - the flow is simple: get value for the key, deserialize it to a list, add/remove items, write modified list back to Redis.
Recently, we noticed a problem - some of the keys will become corrupt (so they can't be deserialized). I don't know why.
Exception says Type definitions should start with a '{', expecting seralized type X, got string starting with: Y at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(Type type, String strType, EmptyCtorDelegate ctorFn, Dictionary'2 typeAccessorMap.
I read other answers - most of them imply you get JSON data from another computer or you don't have control over how it was built. But I do.
We use only few types - most of the properties are simple ints, others are DateTime.
I have only one theory - multithreading is involved. But in that case, it should be "last-write-wins" and no corruption should occur. Anybody else saw that behaviour?
We're using ServiceStack 3.9.71 (latest release from 3.x series) with Redis 2.8.9. .NET 4.5 web application is hosted on Windows and Redis server is on Linux.
ServiceStack.Redis deserialization issue - sometimes JSON is corrupted
308 views Asked by chester89 At
0
There are 0 answers
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
Related Questions in JSON
- Handling both JSON and form values in POST request body with unknown values in Golang
- JSON Body is Not Passing Certain Strings
- Custom rewriter for json
- TypeScript: Type checking while parsing an arbitrary JSON that is typed/
- I dont understand what to do with: System.Text.Json.JsonException: 'The JSON value could not be converted to System.Collections.Generic.IEnumerable`1
- How to perform CRUD operations on a static JSON array in Angular? (without API)
- Dynamic Nested Multi-Dimensional Arrays in Rust
- Creating bar chart in FastAPI
- How to encode ttsJson data?
- Trying to get the id of the last element in my json file through an api
- How to give index id to my uploaded json file in FastAPI?
- JQ JSON - Values to Array
- Spring boot JSON parse error: Unexpected character error
- convert csv file with json data inside to a column, rows table in 2nd csv file
- Sigma.JS custom rendering
Related Questions in REDIS
- How to Socket.IO Multithreading on a Raspberry Pi?
- How to get the session ID returned by cookie with spring-session-data-redis
- Cannot serialize (Spring Boot)
- JEDIS/REDIS 'ON' Keyword or broken query?
- Quart_Sessions Redis deletes keys and create backups instead
- Docker builds redis, mounts the host network and uses 192.168.*.* to access the redis server and is denied
- Need a script to fetch the redis latency values over 20 seconds and store the results in a file
- Service in Docker Compose not connecting to Redis container in docker, Failed to connect to any host resolved for DNS name
- Install redis vector database on GCP in a GKE cluster
- how to avoid while loop while waiting for future complete?
- Is it possible to append the data in Redis command
- Not able to inject RedisCache/SyncCache/StatefulRedisConnection beans in micronaut 4.2.1 version
- RedisConnectionFailureException intermittently
- using redis timeseries in aredes error =>Error handling publish event: [ErrorReply: ERR TSDB: invalid value]
- HttpResponseMessage caching using redis
Related Questions in SERVICESTACK.REDIS
- RedisResponseException: Unknown reply on multi-request
- ServiceStack Redis erros: "Unexpected reply: *", "Protocol error: expected '$', got 'C'", lost connection and etc
- Redis keyspace notifications subscriptions in distributed environment using ServiceStack
- How to access the keyspace notifications with ServiceStack.redis
- ServiceStack Redis Add object with null property to Hash
- ServiceStack Redis search is very slow. How to optimize?
- How to use ServiceStack Redis API?
- ServiceStack PooledRedisClient Timeout exception
- ServiceStack.Redis Sentinel simple setup, "No Redis Sentinels were available"
- ServiceStack.Redis: Unable to Connect: sPort: 50071
- ServiceStack Redis (AWS ElastiCache implementation) using .Net core causing error No master found in: redis-cluster-xxxxxxxx:637
- Redis subscriptions realiblity and retry
- regist servicestack without permission?
- Redis - Loading Dataset is Memory Sport:
- Use of RedisConfig DefaultPoolSizeMultiplier property in RedisPoolManager
Related Questions in SERVICESTACK-BSD
- Identify type of exception in ExceptionHandler of Servicestack
- Could not load type 'ServiceStack.Redis.RedisSentinel' from assembly 'ServiceStack.Redis, Version=3.9.48.0, Culture=neutral, PublicKeyToken=null
- Can I register a servicestack response filter inside web.config?
- ServiceStack.Redis v3 and multiple hosts - recommended architecture
- Exclude complete services from swagger-ui with servicestack
- How can I change the JSON date serialization format for as single service in ServiceStack 3?
- ServiceStack.Redis deserialization issue - sometimes JSON is corrupted
- Accessing responseDTO type in HandleException of custom ServiceRunner in ServiceStack
- Have the ServiceStack v3 libraries been removed from Nuget?
- Is there a way to remove the "/json/reply/" section of the url?
- Unexpected reply on high volume scenario using ServiceStack.Redis
- How to change response encoding?
- ServiceStack 3 service not able to be called
- Do I have access to the request dto when I'm handling exceptions occuring outside of services?
- ServiceStack passing values in service to response attribute
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)