A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io

auth/token is slow #24

Closed evan.jarrett.net
Closed opened by evan.jarrett.net

If I make a curl request to https://atcr.io/auth/token with a manually constructed auth header, I get a response in around 23 seconds. This is longer than docker's timeout, so pull fails with a "net/http: request canceled (Client.Timeout exceeded while awaiting headers)" error. I'm assuming this is something to do with my setup, but I'm not sure how to debug it - it's not DNS, I'm seeing a rapid connection to atcr.io, the long pause is between the request being sent and the response being received. If I don't pass an authentication header the failure message is almost instant.

There is probably some room for improvement, I have a couple fixes for this staged but not actively running in production. Generally it comes down to the timing between calls to my server, and calls to your PDS. if something with your pds takes slightly too long, or it needs to retry a call the whole process drags.

From what I could tell from my logs, from my servers perspective all your calls succeed, just took longer than docker client timeout window.

Basically some of my fixes will be to reduce wasteful calls, and set timeouts on the pds endpoints so that if it’s going to take too long it will fail server side before the client times out.

I think I found at least a partial fix for this... and one that would have negatively impacted newer users the most. it does require a new docker login/push/pull, but after that I hope things start improving for you.

Thanks! This is working for me now.

Sign up or Sign in to add to the discussion.