Closed inqode-lars closed 3 weeks ago
Hi @inqode-lars, can you share which PHP command you execute to clear the sessions without restarting the pod?
I would prefer not to add cron to the images, but instead add a schedule on the Docker host to execute the command in the container: https://docs.docker.com/reference/cli/docker/container/exec/
If you run Baikal in a Kubernetes cluster as a deployment (given you said "pod"), I would add a CronJob that executes that command in the pod. Alternatively, the CronJob can terminate the pod, since the deployment will immediately start a new pod to replace the old one. It may not be as fast as running the cleanup command inside the container, but I'd check if it's fast enough and easier to maintain.
This issue looks inactive, I will close it in 7 days.
Closing this issue due to inactivity.
Hi there,
we are noticing that
/var/lib/php/sessions
gets spammed with sessions over time. Every few months we have to kill our pod because it taking too much inodes because of too many session files (currently 3226291).Executing the script from
/etc/cron.d/php
could clean up the session. Maybe it would be a good idea to add cron to the images and start it using/docker-entrypoint.d/
?