Comments (5)
Hi @MBoden67 ,
Can you give more detail on the issue? Are you talking about windows handles ? Can you detail how you reproduce it ?
from hazelcast-csharp-client.
The Code to reproduce it is in the issue above
run the code against a nonexistent hazelcast server, set up performance monitor on "handle count" and watch it rise
if you're impatient you can add
HazelConfig.GetNetworkConfig().SetConnectionAttemptLimit(0);
or
HazelConfig.GetNetworkConfig().SetConnectionAttemptLimit(1);
which seems to get it to climb faster
from hazelcast-csharp-client.
After some tests, it looks like there is no handle leak. But as socket's has a lingering option that keep sockets's handle unallocated, for a period of time these handles waits the socket-linger period.
After that period we see a sharp deallocation of handles.
User can configure .net client's Socket linger period with
clientConfig.GetNetworkConfig().GetSocketOptions().SetLingerSeconds(3)
But unfortunately, setting a zero value does not disable it altogether. I made a fix for this which will be released in next version (3.9)
Thanks @MBoden67 for your bug report, It also revealed another issue.
from hazelcast-csharp-client.
I just let my testcode run for 3 hour and 18 minutes
it went from using 622 handles to using 59964 handles , se attached images
The running code :
` ClientConfig HazelConfig = null;
IHazelcastInstance instance = null;
Hazelcast.Logging.Logger.SetLoggerFactory(new HazelLogger());
HazelConfig = new ClientConfig();
HazelConfig.GetNetworkConfig().AddAddress("10.10.15.123");
HazelConfig.GetNetworkConfig().SetConnectionAttemptLimit(1);
HazelConfig.GetNetworkConfig().GetSocketOptions().SetLingerSeconds(3);
bool connected = false;
while(!connected)
{
try
{
Program.instance = HazelcastClient.NewHazelcastClient(Program.HazelConfig);
// ConnectToHazelcast();
connected = true;
}
catch (Exception)
{
int ix = 1;
}
}
class HazelLogger : ILoggerFactory, ILogger
{
public ILogger GetLogger(string name)
{
return this;
}
public void Finest(string message)
{
this.Log(LogLevel.Finest, message);
}
public void Finest(Exception thrown)
{
this.Log(LogLevel.Finest, "Exception raised",thrown);
}
public void Finest(string message, Exception thrown)
{
this.Log(LogLevel.Finest, message, thrown);
}
public LogLevel GetLevel()
{
return LogLevel.All;
}
public void Info(string message)
{
this.Log(LogLevel.Info, message);
}
public bool IsFinestEnabled()
{
return true;
}
public bool IsLoggable(LogLevel level)
{
return true;
}
public void Log(LogLevel level, string message)
{
Console.WriteLine($"{DateTime.Now.ToLongTimeString()} [{level.ToString()}] : {message}");
}
public void Log(LogLevel level, string message, Exception thrown)
{
Console.WriteLine($"{DateTime.Now.ToLongTimeString()} [{level.ToString()}] : {message} , {thrown.Message}");
}
public void Severe(string message)
{
this.Log(LogLevel.Severe, message);
}
public void Severe(Exception thrown)
{
this.Log(LogLevel.Severe, "Exception raised",thrown);
}
public void Severe(string message, Exception thrown)
{
this.Log(LogLevel.Severe, message, thrown);
}
public void Warning(string message)
{
this.Log(LogLevel.Warning, message);
}
public void Warning(Exception thrown)
{
this.Log(LogLevel.Warning,"Exception raised", thrown);
}
public void Warning(string message, Exception thrown)
{
this.Log(LogLevel.Severe, message, thrown);
}
}`
from hazelcast-csharp-client.
fixed by #125
from hazelcast-csharp-client.
Related Issues (20)
- Reporting a vulnerability HOT 1
- Memory Leak when doning massive lock/get/set/unlock/publish action [API-2066] HOT 11
- Introduce `PublishAllAsync` in `HTopic` [API-2056]
- The memory usage reporting is misleading on SOAK
- Fix Explicit Run for Cloud Tests [API-2064] HOT 1
- Overload `CompactGenericRecord.ToString()`
- Add `arm` based worker to testing process. HOT 1
- [TRACKING ISSUE] [TPC] Allow TLS sockets in TPC Bootstrapping [HZ-2764]
- Remove Moq as a dependency [API-2119] HOT 1
- Error executing SQL query using IN operator [API-2160] HOT 6
- Question: Predicates as a static and building complex expressions HOT 3
- [TRACKING ISSUE] Make tpcEnable for client configurable through system property. [API-2162] HOT 1
- [TRACKING ISSUE] Promote alto auth codecs to stable [API-2161] HOT 1
- Question: Setting In-Memory-Format for a map different than the cluster default possible? HOT 3
- [TRACKING ISSUE] TPC default to 1 connection
- [TRACKING ISSUE] Fix the `ReliableTopicConfig.setName` method to allow empty names [HZ-2274] [API-2172]
- [TRACKING ISSUE] Continue trying if initial membership event retrieval fails and client is failover [API-2171]
- [TRACKING ISSUE] NearCachedClientMapProxy getAsync fix double invocation [API-1811]
- Client shuts down on failover [API-2176] HOT 1
- Compact Serialization: UnknownSchemaException when using Paging Predicates on getEntriesAsync, etc. HOT 3
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 hazelcast-csharp-client.