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

High CPU load after upgrade to python client 1.2.0 #396

Closed
5 tasks done
kmewhort opened this issue Jan 21, 2025 · 2 comments
Closed
5 tasks done

High CPU load after upgrade to python client 1.2.0 #396

kmewhort opened this issue Jan 21, 2025 · 2 comments
Labels
bug Something is not working.

Comments

@kmewhort
Copy link

Preflight checklist

Ory Network Project

No response

Describe the bug

We're seeing major increases in CPU usage which we have traced to upgrading the python ory_kratos_client from 1.1.0 to 1.2.0. We are mainly just running ApiClient to_session calls (with lighter calls to the IdentityApi).

We have not yet done performance tracing to further narrow down the culprit between different Kratos calls, but just wondering if there's any obvious changes that could be culprit from 0.1.0 to 1.2.0?

Reproducing the bug

  1. Run a set of calls using the following APIs, using the 1.1.0 client, while profiling CPU usage:
from ory_kratos_client.api import frontend_api, identity_api
from ory_kratos_client.exceptions import UnauthorizedException
from ory_kratos_client.models.create_identity_body import CreateIdentityBody
from ory_kratos_client.models.identity_with_credentials import IdentityWithCredentials
from ory_kratos_client.models.identity_with_credentials_password import (
    IdentityWithCredentialsPassword,
)
from ory_kratos_client.models.identity_with_credentials_password_config import (
    IdentityWithCredentialsPasswordConfig,
)
from ory_kratos_client.models.update_identity_body import UpdateIdentityBody
  1. Run the same set of calls using the 1.2.0 client.
  2. See that the CPU usage is much higher on the 1.2.0 client.

Relevant log output

Relevant configuration

Version

1.2.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker

Additional Context

No response

@kmewhort kmewhort added the bug Something is not working. label Jan 21, 2025
@aeneasr
Copy link
Member

aeneasr commented Jan 22, 2025

I don't think the SDK is at fault as it's just doing an HTTP call to our API. Maybe you can confirm that there are no other changes that may impact CPU on your end.

@kmewhort
Copy link
Author

Thanks for the confirmation. Yes, looking at the lightweight library code, I concur it would be an unlikely culprit after all. We'll dive in elsewhere and I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants