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

Release 2024.10.1 uses much more CPU #11965

Open
j64bit opened this issue Nov 8, 2024 · 8 comments
Open

Release 2024.10.1 uses much more CPU #11965

j64bit opened this issue Nov 8, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@j64bit
Copy link

j64bit commented Nov 8, 2024

Authentik is a great tool and I'd to start with thanking all involved for making it available to home users like myself!

Describe the bug
After upgrading to "Release 2024.10.1" CPU usage is dramatically increased already idle state.

grafik

I use the docker image in an alpine linux lxc with promox on a intel laptop.

To Reproduce
Install the version and observe CPU usage

Expected behavior
Unchanged CPU usage

Screenshots
See above

Logs
none

Version and Deployment (please complete the following information):

  • authentik version: 2024.10.1
  • Deployment: docker-compose in proxmox environment

Additional context
I reverted back to previous version.

@j64bit j64bit added the bug Something isn't working label Nov 8, 2024
@EHRETic
Copy link

EHRETic commented Nov 8, 2024

Hi,

I can confirm that behaviour too, climbed right after the update on my Docker VM:

image

Don't if it helps, but this is the process taking CPU on my VM:

image

Seems to come from worker:

image

Found something about Celery in Worker logs:

2024-11-08T09:10:38.361545149Z warning | event=/ak-root/venv/lib/python3.12/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(
 logger=py.warnings timestamp=1731057038.3590796 
2024-11-08T09:10:38.378573216Z warning | event=/ak-root/venv/lib/python3.12/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
  warnings.warn(
 logger=py.warnings timestamp=1731057038.3783574 

Let me know if you need more (but I might help to get more!) 😊

@j64bit
Copy link
Author

j64bit commented Nov 8, 2024

Interesting. Did you try setting "broker_connection_retry_on_startup" to False (to avoid the retries - if I got this right)?

@4d62
Copy link
Contributor

4d62 commented Nov 8, 2024

I notice these spikes to 120% cpu usage and then it goes back to normal after a few seconds since I upgraded to 2024.10.1

@EHRETic
Copy link

EHRETic commented Nov 9, 2024

Interesting. Did you try setting "broker_connection_retry_on_startup" to False (to avoid the retries - if I got this right)?

Hi, I just tried but it didn't change anything (tried the setting in both server & worker containers)

What can I provide/test you now?

Some extra background: I use Authentik in my private infra and for Docker apps, I always try to keep a "prod" and a "test" instance, which is the case for Authentik too (I have to break things I use every day !).

For now, I have the feeling that only the test instance is impacted (all my test instances run on a dedicated VM)
My prod runs on Almalinux 8.X, the test on a 9.X, but Authentik was implemented the same way... so I don't if OS could have an impact.

@j64bit
Copy link
Author

j64bit commented Nov 9, 2024

ah, ok. thanks.
i just noticed i am still using postgress 12. in past months there was a change to postgress 16.
Maybe that is the source. I will try to do the upgrade now ...
As per this: https://docs.goauthentik.io/docs/troubleshooting/postgres/upgrade_docker

@EHRETic
Copy link

EHRETic commented Nov 9, 2024

ah, ok. thanks. i just noticed i am still using postgress 12. in past months there was a change to postgress 16.

I'm using PG16 since the start on both of my instances, so I don't think it might change something.

@j64bit
Copy link
Author

j64bit commented Nov 9, 2024

correct - no improvement after upgrade to 16 for postgres.
Looks like workers are being started continiuosly one by one - as in your screenshots.

@EHRETic
Copy link

EHRETic commented Nov 13, 2024

Strangely, rolling back to 2024.8 doesn't solve the CPU issue in my test instance (rolling back from updated instance)
Restore would work
Update: Restore from backup didn't work, I get this celery process taking a lot of CPU again.

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

No branches or pull requests

3 participants