Hi Avadhoot,
If your Mendix application logs stop generating after 5-7 days and only resume after restarting the application, the issue may be related to log rotation, container logging behavior, or system resource limits. One possible cause is that the application is writing logs to a file that gets rotated but does not automatically switch to the new log file. You can check this by running lsof | grep <your-log-file>
to ensure the logs are still being written to the correct location. Additionally, modifying the logrotate.conf
settings by adding copytruncate
could help, as this allows the log file to be truncated in place while keeping the same file descriptor. Another factor to consider is disk space and inodes, which can be checked using df -h
and df -i
. If disk usage is high, logs may stop being written. Furthermore, if your Mendix container is configured to log to stdout
or stderr
, the logs might be stored in the Docker logging system instead of a file. Running docker logs <container_id>
can help determine if logs are still being captured. If the issue is related to logging limits, check the Docker daemon settings (/etc/docker/daemon.json
) and adjust parameters like max-size
and max-file
to allow more log retention. It is also worth enabling debug-level logs temporarily in Mendix to identify potential runtime issues that may be causing logs to stop unexpectedly. As a workaround, you can set up a cron job or monitoring script to check whether logs are being written and automatically restart the logging service or the Mendix application if necessary. If the problem persists, examining Mendix runtime logs, container logs, and system logs (dmesg
or journalctl
) might provide additional insights into the root cause.
If this does not help, you can refer to this doc, maybe this will help:
Hope this helps!
Hi Rishabh,
Thank you for sharing the details. Do you know if there is any way to set these configuration related to log rotation on Mendix runtime? Because mendix does not allow us to modify the DaemonSets or ConfigMaps and we cannot really set these parameters directly on a node as the configuration will be lost whenever the node is replaced.