Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asp.net core concurrency issues #539

Closed
mycsj opened this issue Dec 20, 2016 · 8 comments
Closed

asp.net core concurrency issues #539

mycsj opened this issue Dec 20, 2016 · 8 comments

Comments

@mycsj
Copy link

mycsj commented Dec 20, 2016

environment

windows 7
.net core sdk 1.0.0
vs code 1.8.1
StackExchange.Redis 1.1.608
redis 3.2

project.json

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Routing": "1.0.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "StackExchange.Redis": "1.1.608"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true,
    "debugType": "portable"
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "Areas/**/Views",
      "appsettings.json",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },

  "tooling": {
    "defaultNamespace": "Test"
  }
}

Startup.cs

        public void ConfigureServices(IServiceCollection services)
        {
            // Add framework services.
            services.AddSingleton(ConnectionMultiplexer.Connect("127.0.0.1:6379") as IConnectionMultiplexer);
            services.AddMvc();
        }       

TestController

        public readonly IConnectionMultiplexer _connect ;

        public ValuesController(IConnectionMultiplexer connect){
            _connect = connect;        
        }

        [HttpGet]
        [RouteAttribute("/")]
        public string Get()
        {
            return _connect.GetDatabase().HashGet("session:abcdefg","session").ToString();
        }

use ab test
ab -c 100 -n 100 http://127.0.0.1:5000/

exception message

"Timeout performing HGET session:abcdefg, inst: 6, queue: 6, qu: 0, qs: 6, qc: 0, wr: 0, wq: 0, in: 115, ar: 0, clientName: xxxx (Please take a look at this article for some common client-side issues that can cause timeouts: https://github.com/StackExchange/StackExchange.Redis/tree/master/Docs/Timeouts.md)"

but in vs 2015. Net 4.5 environment there is no such problem

@mycsj
Copy link
Author

mycsj commented Dec 22, 2016

No one to answer the question?

@mycsj
Copy link
Author

mycsj commented Dec 22, 2016

do it yourself and you will get food and clothing you need
ample food and clothing through self reliance

@NickCraver
Copy link
Collaborator

This is a reason to add #505 in, @mgravell let me know when you're at a calm point on Geo and I'll merge that in. It should be good to go as-is, but should definitely be in the next release.

@cleverguy25
Copy link

@NickCraver #505 certainly helps when not running core, but that code specifically is commented out in core. #599 sounds very similar to this issue, although at higher gs and in variables.

@NickCraver
Copy link
Collaborator

This debug info is not in netstandard2.0 as well, which enables it on Core. There has also been a ton of work on the .NET Core side that drastically impacts things here. The landscape has changed so much (including more information in the message), I'm going to close this specific issue out. If anyone is still hitting a distinct timeout issue though, please (using 1.2.6 or later) open an issue with the error message...it'll help is greatly in debugging.

@philiahe
Copy link

1.2.6 still have this problem

@NickCraver
Copy link
Collaborator

@philiahe We suggest upgrading to the 2.x release - 1.x needed sweeping architectural changes to address a lot of the connectivity issues and some breaking changes, so that's why it's a major version bump. 1.x will receive no further updates.

@philiahe
Copy link

@philiahe We suggest upgrading to the 2.x release - 1.x needed sweeping architectural changes to address a lot of the connectivity issues and some breaking changes, so that's why it's a major version bump. 1.x will receive no further updates.

thx a lot , ok now ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants