jlavallet
jlavallet

Reputation: 1375

Slow Response from ABP Authentication

I have just downloaded and configured my first ABP solution and I'm having a performance problem.

I chose the option to have a separate site for IdentityServer. I configured a database and changed the ConnectionString entries in the appsettings.json files of the Hosts project, Migration project, and the IdentityServer project. I followed all the instructions in the getting started tutorial.

Everything (eventually) works but each time I try to authenticate myself either to the Swagger site or the Angular website, there is a significant (minutes-long) delay before I am either logged in or the request times out.

Suspected Problem:

So I read that the site uses a redis cache during login. I have never used this technology before. I had to get that installed.

I used the following commands to pull down the image and run it in Docker - another technology that I have not used before:

PS C:\WINDOWS\system32> docker pull redis
Using default tag: latest
latest: Pulling from library/redis
a330b6cecb98: Pull complete
14bfbab96d75: Pull complete
8b3e2d14a955: Pull complete
5da5e1b21a2f: Pull complete
6af3a5ca4596: Pull complete
4f9efe5b47a5: Pull complete
Digest: sha256:e595e79c05c7690f50ef0136acc9d932d65d8b2ce7915d26a68ca3fb41a7db61
Status: Downloaded newer image for redis:latest
docker.io/library/redis:latest

PS C:\WINDOWS\system32> docker run --name development9-redis -d redis
eee1a05c90e7a492a19eab025fe307b17040ba35ea2f3bc5fbd5df1bab372028

This appeared to do something, so I assume my cache is running and available. Am I missing something? Could a misconfiguration of redis be the cause of my performance problem?

Please ask me any relevant questions you'd like and I will describe my set up. Thanks.

Angular site showing significant delay in loading

Upvotes: 0

Views: 1053

Answers (1)

Engincan Veske
Engincan Veske

Reputation: 1575

As you've pointed out, your performance issue is probably related to the improper Redis configuration. It really helps to downgrade response time.

  • You need to check the Redis running on port 6379, and also check does it get requests.

  • You might find useful this comment if you have a question about why I need to use Redis. (Redis can help you to share data between IdentityServer and your host application.)

"run the command docker run --nameredis-container -p 6379:6379 -d redis and change the redis connection string in your appsettings to localhost:6379." https://github.com/abpframework/abp/issues/3487#issuecomment-611208048

Upvotes: 4

Related Questions