Skip to content

Instantly share code, notes, and snippets.

View JonCole's full-sized avatar

Jon Cole JonCole

  • Microsoft Corporation
View GitHub Profile
@JonCole
JonCole / SupportQuestionnaire.md
Last active May 3, 2017 17:29
Support Questionnaire

When contacting us with questions, please provide the following information to enable us to best help you.

Required Information

  • Cache Name

  • Date&Time when issue started and ended. Note: A 1-2 hour time window is ideal. If the issue is intermittent, please provide exact times for a few of the errors so that we can correlate with our logs.

    Important: Please Specify whether times are in UTC or some other Time > Zone. If you do not clarify the time zone, we don't know what time

@JonCole
JonCole / CrashDumpHelper.cs
Last active September 25, 2017 15:47
Crash Dump instructions and Helper code for doing it programmatically.
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
namespace System.Diagnostics
{
public static class CrashDumpHelper
{
/// <summary>
@JonCole
JonCole / StackExchangeRedisExtensions.cs
Last active March 13, 2019 19:16
StackExchange.Redis Extension Methods
namespace StackExchange.Redis
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
public static class StackExchangeRedisExtensions
{
public static IEnumerable<IServer> GetMasterServers(this IConnectionMultiplexer connection)
@JonCole
JonCole / TlsVersionTest.cs
Last active June 5, 2019 21:06
TLS Version Test
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Security;
using System.Net.Sockets;
using System.Security.Authentication;
using System.Text;
using System.Threading.Tasks;
namespace System
@JonCole
JonCole / AzureRedis-PatchingExplained.md
Last active October 22, 2019 17:28
AzureRedis-PatchingProces
@JonCole
JonCole / WhatHappenedToMyDataInRedis.md
Last active October 28, 2019 19:43
What happened to my data in Redis?
@JonCole
JonCole / DiagnoseRedisErrors-ClientSide.md
Last active January 6, 2020 17:52
Diagnosing Redis errors caused by issues on the client side
@JonCole
JonCole / License-For-Source-Code.md
Last active July 7, 2020 17:57
License for Source Code

Summary

Unless otherwise noted, all source code under https://gist.github.com/joncole is licensed using a slightly modified MIT License. Key difference is that you don't have to copy this license with the source code/samples given here.

Modified MIT License

Copyright 2018 Jon Cole

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AU

@JonCole
JonCole / SE.Redis-SetAbortConnectToFalse.md
Last active March 25, 2021 15:55
StackExchange.Redis - "disconnected multiplexer" error

The Symptom

An application is using StackExchange.Redis to connect to their Redis instance and everything is working fine until suddenly exceptions like this start happening.

It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail.
at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log)
at MyApp.Web.Redis.StackExchangeClientConnection..ctor(ProviderConfiguration configuration)
at MyApp.Web.Data.GetInventoryData()

The Cause

@JonCole
JonCole / DiagnoseRedisErrors-ServerSide.md
Last active December 2, 2021 16:25
Diagnosing Redis errors on the server side