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/
4.1G /var/log/journal/

More details:

[15:05:04 server root@test ~/root]cPs# systemctl status systemd-journald | grep max
  May 31 03:50:56 server.test.com systemd-journal[16267]: 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:

https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html

“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:

https://www.freedesktop.org/software/systemd/man/journald.conf.html

The log size limitation is handled by option given below:

The Following are the entry that needs to be checked.

SystemMaxUse=,
SystemKeepFree=,
SystemMaxFileSize=,
SystemMaxFiles=,
RuntimeMaxUse=,
RuntimeKeepFree=,
RuntimeMaxFileSize=,
RuntimeMaxFiles=
RuntimeMaxFiles=

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.

[tagline_box backgroundcolor=”description=” shadow=”no” shadowopacity=”0.7″ border=”1px” bordercolor=”” highlightposition=”top” content_alignment=”left” link=”” linktarget=”_self” modal=”” button_size=”” button_shape=”” button_type=”” buttoncolor=”” button=”” title=”” description=”If you have any queries regarding why no new logging entry are writing to Cpanel logs free to leave us a message and our representative will get back to you.

” margin_top=”50px” margin_bottom=”” animation_type=”slide” animation_direction=”left” animation_speed=”0.3″ class=”” id=””]

    [/tagline_box]