Try Playground
Show / Hide Table of Contents

Troubleshooting

This page guides you about the possible exceptions which you may encounter while using the NCache along with the appropriate workarounds to deal with them.

Disabling BinaryFormatter Serialization And Deserialization

Message: BinaryFormatter serialization and deserialization are disabled within this application.

You'll encounter this exception with ASP.NET 5.0 or above and .NET 8.0 or above. As in both cases, the Binary Formatter is disabled by default. This issue can be solved by using the following workarounds.

Workaround

  • Enable the Binary Formatter by adding the following tag in project.csproj file:
<PropertyGroup>
...
    <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
...
</PropertyGroup>
Note

This is explained further here.

  • Alternatively, you can use JSON Serialization instead of Binary Serialization as the serialization format at the time of cache creation.
Note

It is recommended that you use the JSON serialization.

No sigar-amd64-winnt.dll in java.library.path

If you haven't included the sigar-amd64-winnt.dll file for Windows or the sigar-amd64-winnt.so file for Linux in your class path, you will encounter this warning, and when this happens, you won't be able to monitor your counters (in Java).

Workaround

Include the sigar-amd64-winnt.dll file for Windows or the sigar-amd64-winnt.so file for Linux in your classpath.

InvalidOperationException: Missing 'UseWindowsThreadPool' Flag in Runtime Configuration

Message: The flag 'System.Threading.ThreadPool.UseWindowsThreadPool' is not set to true in application runtimeconfig.json. It is mandatory for .NET 7.0 and greater versions.

You'll encounter this exception with .NET 7.0 and above if you haven't set the System.Threading.ThreadPool.UseWindowsThreadPool flag to true in the application runtime configuration. Without this configuration, the application cannot utilize the Windows Thread Pool for optimized thread scheduling and execution.

Workaround

Set the System.Threading.ThreadPool.UseWindowsThreadPool flag to true in the application configuration:

{
    "runtimeOptions": {
        "configProperties": {
        "System.Threading.ThreadPool.UseWindowsThreadPool": true
        }
    }
}

InvalidConfigurationException: Missing or Insufficient 'MinThreads' Setting in Runtime Configuration

Message: The flag 'System.Threading.ThreadPool.MinThreads' is not set to 100 or greater in application runtimeconfig.json. It is mandatory for .NET 7.0 and greater versions.

This exception occurs because the System.Threading.ThreadPool.MinThreads flag in the application runtime configuration is not set to a value of 100 or greater in Linux. This setting is mandatory in .NET 7.0 and later versions.

Workaround

Set the MinimumThreads flag to a value of 100 in the application configuration to ensure proper functionality with NCache.

{
    "runtimeOptions": {
        "configProperties": {
        "System.Threading.ThreadPool.MinThreads": 100
        }
    }
}

See Also

How to Connect to Cache
Error Handling in Cache

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

[email protected]

[email protected]

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top
OSZAR »