This version brings a new method of parsing responses from Redis in .NET Core that works well even if CLR’s thread pool is starved. Dedicated reader threads now used for this purpose when running on Linux or macOS, but on Windows thread pool’s I/O threads now used instead to avoid spawning additional threads, since I/O threads work fine there. So upgrades are great for all of the operating systems.

Also Keepalive option is now set for sockets when running on Windows (all .NET platforms) or even macOS and Linux (when targeting netcoreapp3.0 and higher) to avoid losing a connection due to firewalls when awaiting a large Redis transaction and latency is really high, since heartbeats aren’t working well in this scenario.

  • Addednetcoreapp3.0 target to support Keepalive socket option in a cross-platform way.
  • Added – Use Keepalive socket option on Windows for other platform targets.
  • Added – Allow to use TimeSpan.Zero as a distributed lock timeout.
  • Added – Cross-platform synchronous method for reading responses in a dedicated thread.
  • Changed – Use async socket APIs on Windows, and sync APIs on other systems.
  • Changed – Don’t use thread pool timers for distributed lock extension.
  • Changed – Don’t use thread pool timers when performing heartbeats.
  • Changed – Added a number of internal improvements to the StackExchange.Redis library.
  • Fixed – Timeout exceptions in .NET Core on Linux and macOS when thread pool is starved.
  • Fixed – Don’t throw ObjectDisposedException when storage was disposed twice.

Update Version 2.7.1 was also released to address the following problems:

  • FixedPlatformNotSupportedException while creating a connection in .NET Core 3.X on Unix systems.
  • Fixed – Connection loop thread stops and logs a fatal exception on socket error.
  • FixedResolveDNS option doesn’t work when multiple entries returned from DNS server.
  • FixedRedisConnectionException when trying to connect to “localhost” on Mono.

Subscribe to monthly updates

Subscribe to receive monthly blog updates. Very low traffic, you are able to unsubscribe at any time.

Comments