Closed a-patel closed 3 years ago
https://localhost:44312/api/abp/application-configuration https://localhost:44312/.well-known/openid-configuration
Above API calls take more than 5-10 minutes every time during development.
Did you start the redis server? Please provide logs Thanks.
@liangshiw Can we make Redis optional?
The applications use Redis as as distributed cache. So, you need to have Redis installed & running.
I have changed the Redis connection string and made sure that it is running. Now I am able to get responses and able to log in. But still, it is taking more than 10s -1 minute for some API call.
https://localhost:44373/.well-known/openid-configuration/jwks https://localhost:44373/connect/token https://localhost:44312/api/abp/application-configuration
Please check the application log.
Logs (Identity Server):
2020-06-09 14:14:44.824 +05:30 [INF] Request finished in 13143.7343ms 200 application/json; charset=UTF-8
2020-06-09 14:14:45.023 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44373/.well-known/openid-configuration/jwks
2020-06-09 14:14:45.028 +05:30 [DBG] Request path /.well-known/openid-configuration/jwks matched to endpoint type Discovery
2020-06-09 14:14:58.524 +05:30 [DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryKeyEndpoint
2020-06-09 14:14:58.524 +05:30 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks
2020-06-09 14:14:58.524 +05:30 [DBG] Start key discovery request
2020-06-09 14:14:58.526 +05:30 [INF] Request finished in 13503.4084ms 200 application/jwk-set+json; charset=UTF-8
Please follow the logs to solve your problem.
[WRN] It was not possible to connect to the redis server(s). UnableToConnect on 127.0.0.1:6379/Interactive, Initializing/NotStarted, last: NONE, origin: BeginConnectAsync, outstanding: 0, last-read: 1s ago, last-write: 1s ago, keep-alive: 60s, state: Connecting, mgr: 10 of 10 available, last-heartbeat: never, global: 6s ago, v: 2.0.593.37019
That was old logs before local Redis. Then I have changes the Redis (Azure Redis) server endpoint. Above mentioned logs (my comment) are after that change.
@maliming @hikalkan Please re-open this issue.
I am doing the above things again. (Fresh start - with working Redis and deleting old logs) Still taking too much time.
New Logs (Identity Server):
2020-06-09 15:17:31.516 +05:30 [INF] Request finished in 13397.3514ms 200 application/json; charset=UTF-8
2020-06-09 15:17:31.581 +05:30 [INF] Request starting HTTP/1.1 GET https://localhost:44373/.well-known/openid-configuration/jwks
2020-06-09 15:17:31.584 +05:30 [DBG] Request path /.well-known/openid-configuration/jwks matched to endpoint type Discovery
2020-06-09 15:17:44.881 +05:30 [DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryKeyEndpoint
2020-06-09 15:17:44.881 +05:30 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks
2020-06-09 15:17:44.881 +05:30 [DBG] Start key discovery request
2020-06-09 15:17:44.885 +05:30 [INF] Request finished in 13303.8247ms 200 application/jwk-set+json; charset=UTF-8
hi @a-patel Can you check the logs of the identity server project?
All the information is in the log.
I already have checked that, also attached whole log file in my previous comment.
If I am trying without Identity Server option while creating the project then it is working fine,
hi @a-patel
I can't reproduce your problem. The response of the Identity server is fast in my computer. Can you try another computer?
@maliming I have tried on other machine, other browsers, private browser, etc. It takes around 1-2 minutes to complete the above API call. (With invalid Redis Connection string, it was taking 5-10+ minutes)
hi
Please try to remove the redis related code. Then the memory cache will be used.
AbpDemoNgHttpApiHostModule.cs
ConfigureRedis(context, configuration, hostingEnvironment);
AbpDemoNgIdentityServerModule.cs
context.Services.AddStackExchangeRedisCache(options => { options.Configuration = configuration["Redis:Configuration"]; });
I am getting the response in time after commenting on the above code.
Is this correct? Please confirm.
@a-patel so if Redis is NOT used, the Separated Identity Server "version" of abp still works as expected?
Yes, If Redis is not used (after removing above code), it is working as expected. What if I want to use Redis?
I tried with Redis for windows(https://www.onlinetutorialspoint.com/spring-boot/setup-install-redis-server-on-windows-10.html), but I always get this error (Postgres db):
Crap, this is cookie-related issue. :( I tried in other browser and it works.
I am using SQL Server database, I have tried in different machines.
@a-patel, my timings with fresh abp v2.9.0 and Redis (https://www.onlinetutorialspoint.com/spring-boot/setup-install-redis-server-on-windows-10.html):
@maliming, do you get comparable timings (in development environment)?
hi @a-patel @leonkosak
I think we have confirmed that this problem is related to the performance of redis, not to abp.
I am using docker's redis in wsl (ubuntu).
I agree. But in my case (my computer), the timings are acceptable (and much lower than what @a-patel environment).
the redis on windows version is very old, I came this sence before ,when I use the new redis server in linux,it may reduce much time
it
the redis on windows version is very old, I came this sence before ,when I use the new redis server in linux,it may reduce much time
That is when I used the old abp
named aspnetboilerplate
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Separate Identity Server: Performance Issue:
Using the above options, I have created a sample application. I haven't made any changes, But I am not able to log in.