In certain case, we face an odd issue in which we could see that server is not making any entry in log files.
No new Log is writing in to log files even if we try to clear the log files such as error log, access log, lfd etc..
This issue appears due to systemd-journald service. By default, the server is configured to store data with size up to 4 G in /var/log/journal/ when this limit exceed and save data with size more than 4G in /var/log/journal/ then the system fails to write the new entry to cPanel logs.
For example in my test server which, I have worked on shows that my server journal directory exceed the limit 4 GB size, as a result, no more entry will be written to the cPjanel logs.
[15:00:54 server root@test ~/root]cPs# du -sh /var/log/journal/
[15:05:04 server root@test ~/root]cPs# systemctl status systemd-journald | grep max
May 31 03:50:56 server.test.com systemd-journal: Permanent journal is using 4.0G (max allowed 4.0G, trying to leave 4.0G free of 35.7G available → current limit 4.0G).
To summarize the functions of this service, let us quote directly from the systemd-journald documentation:
“systemd-journald is a system service that collects and stores logging data. It makes and keeps up organized, recorded diaries in light of logging data that is gotten from an assortment of sources.”
By default, systemd-journald will only log a maximum of 4GB, unless manually set to a higher limit. When journald hits this limit, it can cause issues for the general log-keeping on your system, which is maintained by the rsyslogd service.
This issue can be resolved with following steps:
-Clear out the files in /var/log/journal and restart the systemd-journald and rsyslogd services via the following command:
systemctl restart systemd-journald && /scripts/restartsrv_rsyslogd
-Alternatively, you’ll need to customize <span style=”color: blue;”>/etc/journad.conf</span> to allow journald to consume more than 4GB of data. The following documentation provides further insight on how to achieve this:
The log size limitation is handled by option given below:
The Following are the entry that needs to be checked.
If you have root access to the server then you could implement this changes. If not then reach out to a system administrator or even your hosting provider for additional assistance with implementing these changes.
” margin_top=”50px” margin_bottom=”” animation_type=”slide” animation_direction=”left” animation_speed=”0.3″ class=”” id=””]