I have created the Kubernetes cluster.
Configuration : 4 CPU X 16 GB Memory
On the above Kubernetes cluster, I deployed a hyperledger blockchain network with Hyperledger Explorer (as pod). The Blockchain network is working fine. Hyperledger Explorer is also working but only for a few hours after that it gets stop, neither showing error nor warning, and the pod is also in "running" status. But is not synching blockchain transaction data.
I created two pods, one for explorer and one for explorer-DB. I checked logs of the explorer-db pod and get below lines
2021-12-24 17:12:58.232 UTC [31] LOG: aborting any active transactions 2021-12-24 17:12:58.269 UTC [31] LOG: worker process: logical replication launcher (PID 38) exited with exit code 1 2021-12-24 17:12:58.289 UTC [33] LOG: shutting down 2021-12-24 17:12:58.490 UTC [31] LOG: database system is shut down done server stopped PostgreSQL init process complete; ready for start up. 2021-12-24 17:12:58.691 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2021-12-24 17:12:58.691 UTC [1] LOG: listening on IPv6 address "::", port 5432 2021-12-24 17:12:58.709 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2021-12-24 17:12:58.989 UTC [65] LOG: database system was shut down at 2021-12-24 17:12:58 UTC 2021-12-24 17:12:59.089 UTC [1] LOG: database system is ready to accept connections
I figured out the solution for the above problem with the
Kubernetes sidecar pattern. So whenever my main container restart due to some memory issue its sidecar container also restarts automatically.