Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
afe847fc
Commit
afe847fc
authored
Apr 03, 2015
by
Marc Gravell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #184 from JonCole/master
Add ThreadPool statistics to Timeout message to help debug IOCP issues
parents
dbec9ca5
c20e6c98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
ConnectionMultiplexer.cs
...change.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
+23
-0
No files found.
StackExchange.Redis/StackExchange/Redis/ConnectionMultiplexer.cs
View file @
afe847fc
...
@@ -1817,6 +1817,8 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
...
@@ -1817,6 +1817,8 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
.
Append
(
", wr="
).
Append
(
wr
).
Append
(
"/"
).
Append
(
wq
)
.
Append
(
", wr="
).
Append
(
wr
).
Append
(
"/"
).
Append
(
wq
)
.
Append
(
", in="
).
Append
(
@in
).
Append
(
"/"
).
Append
(
ar
);
.
Append
(
", in="
).
Append
(
@in
).
Append
(
"/"
).
Append
(
ar
);
AppendThreadPoolStats
(
sb
);
errMessage
=
sb
.
ToString
();
errMessage
=
sb
.
ToString
();
if
(
stormLogThreshold
>=
0
&&
queue
>=
stormLogThreshold
&&
Interlocked
.
CompareExchange
(
ref
haveStormLog
,
1
,
0
)
==
0
)
if
(
stormLogThreshold
>=
0
&&
queue
>=
stormLogThreshold
&&
Interlocked
.
CompareExchange
(
ref
haveStormLog
,
1
,
0
)
==
0
)
{
{
...
@@ -1839,6 +1841,27 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
...
@@ -1839,6 +1841,27 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
}
}
}
}
private
static
void
AppendThreadPoolStats
(
StringBuilder
errorMessage
)
{
//BusyThreads = TP.GetMaxThreads() –TP.GetAVailable();
//If BusyThreads >= TP.GetMinThreads(), then threadpool growth throttling is possible.
int
maxIoThreads
,
maxWorkerThreads
;
ThreadPool
.
GetMaxThreads
(
out
maxWorkerThreads
,
out
maxIoThreads
);
int
freeIoThreads
,
freeWorkerThreads
;
ThreadPool
.
GetAvailableThreads
(
out
freeWorkerThreads
,
out
freeIoThreads
);
int
minIoThreads
,
minWorkerThreads
;
ThreadPool
.
GetMinThreads
(
out
minWorkerThreads
,
out
minIoThreads
);
int
busyIoThreads
=
maxIoThreads
-
freeIoThreads
;
int
busyWorkerThreads
=
maxWorkerThreads
-
freeWorkerThreads
;
errorMessage
.
AppendFormat
(
", IOCP:(Busy={0},Min={1},Max={2})"
,
busyIoThreads
,
minIoThreads
,
maxIoThreads
);
errorMessage
.
AppendFormat
(
", WORKER:(Busy={0},Min={1},Max={2})"
,
busyWorkerThreads
,
minWorkerThreads
,
maxWorkerThreads
);
}
/// <summary>
/// <summary>
/// Should exceptions include identifiable details? (key names, additional .Data annotations)
/// Should exceptions include identifiable details? (key names, additional .Data annotations)
/// </summary>
/// </summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment