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

Random high lock waiting time in PostgreSQL #244

Open
bubiche opened this issue Dec 27, 2024 · 0 comments
Open

Random high lock waiting time in PostgreSQL #244

bubiche opened this issue Dec 27, 2024 · 0 comments

Comments

@bubiche
Copy link

bubiche commented Dec 27, 2024

I have been encoutering high lock wait time for the cache write query INSERT INTO "solid_cache_entries" ... randomly. These spikes don't correlate with a surge in traffic or anything. Is there a way for me to investigate more into this and how can I improve the situation?

I have tried using UNLOGGED TABLE as suggested here, which improved cache write perforamnce but it still didn't help.

For context the cache read query SELECT "solid_cache_entries"."key", "solid_cache_entries"."value" FROM "solid_cache_entries" WHERE "solid_cache_entries"."key_hash" IN ($1) is run ~7700 times/s and the cache write query INSERT INTO "solid_cache_entries" ... ON CONLICT ... is run ~550 times/s, our database server CPU usage is only ~16% when the high lock waiting time happened.

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

No branches or pull requests

1 participant