-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## Operational Notes | ||
|
||
This document contains operational notes. | ||
|
||
### Postgres subchart for demonstration purposes only | ||
|
||
It's not recommended to use the postgres dependency from Bitnami outside of a demonstration context. | ||
|
||
The helm charts provide the option to connect to an external database. | ||
|
||
### Persistent volume running out of space | ||
|
||
It was observed that the centralIdP Keycloak can quite run easily out of space due the event_entity table logging login requests. | ||
|
||
This was observed in the connection with the postgres dependency from Bitnami which defaults to 8Gi for the persistent volume (for reference within the helm charts this could be postgresql.primary/readReplicas.persistence.size). | ||
|
||
> The general recommendation is to have concepts in place (database maintenance, monitoring, etc.) to prevent this from happening, which is outside of the scope of a reference implementation. | ||
|
||
#### How to solve | ||
|
||
Expand the persistent volume by requesting more storage within the persistent volume claim (spec.resources.requests.storage). | ||
|
||
[OPTIONAL] In addition also the event_entity table can be cleaned up. | ||
|
||
Useful query to get an overview on the database: | ||
|
||
``` | ||
SELECT relname as table_name, pg_size_pretty(pg_total_relation_size(relid)) as total_size FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC; | ||
``` | ||
|
||
Statements for cleanup: | ||
|
||
``` | ||
// adjust the 'event_time < 1690892701000' accordingly, https://www.epochconverter.com/ | ||
DELETE FROM | ||
public.event_entity | ||
WHERE id in | ||
(SELECT id FROM public.event_entity | ||
WHERE | ||
event_time < 1690892701000 | ||
ORDER BY | ||
event_time ASC | ||
LIMIT | ||
300000); | ||
``` | ||
|
||
``` | ||
VACUUM FULL | ||
verbose public.event_entity | ||
``` | ||
|
||
## NOTICE | ||
|
||
This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
- SPDX-License-Identifier: Apache-2.0 | ||
- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation | ||
- Source URL: https://github.com/eclipse-tractusx/portal-iam |