Forum Home › Forums › Uncategorized Issues › Mono high cpu usage
- This topic has 16 replies, 2 voices, and was last updated 3 years, 8 months ago by Mikhail.
-
AuthorPosts
-
March 9, 2021 at 2:45 am #8446JWParticipant
I noticed that abnormal high cpu usage of mono happened on some of my projects:
project 1ubuntu 20.04 desktop Scada Version 5.8.2 Mono version 6.10.0.104
project 2
ubuntu 20.04 server Scada Version 5.8.2 Mono version no info
https://drive.google.com/file/d/12O99yqbjY2MZhv7wHoXXSRZk_dOLFJKU/view?usp=sharing
there are more than 3 mono processes, 2 of them use more than 100% cpu, i suspected to be scadaserver and scadacomm.
the web page is still accessible.
the terminal is frozen when open on the server locally.
can ssh to server and run commands.
resume normal after system reboot. happened again after months.
haven’t try whether restarting the services would resumed normal or not.March 9, 2021 at 1:54 pm #8459MikhailModeratorwww-data user is a web application. You should check operations in ScadaWeb.log before CPU load happened. What users did that time?
Instead of reboot try restart_apache.sh next time.
March 9, 2021 at 4:24 pm #8463JWParticipantNot sure when the high cpu load started. Haven’t check the system since last update 2 months ago until now. Any idea what I should look for?
Will it effect scada if I kill the www-data PID?
On the server with ubuntu desktop, I have a chromium browser showing scada dashboard alway on. I found that the chromium is frozen too, but not sure it’s the cause or the result.
March 9, 2021 at 4:52 pm #8464JWParticipantThe server of project 1 is in production environment, restarting SCADA will trigger an alarm. Since web access from other client browser is still working, I haven’t do anything to it yet.
other symptoms are very wired. Terminal, File Manager, Chromium are not working. while the desktop gui and other gui apps still working. SSH and teamviewer are still working.
I am not sure is it the desktop gnome-session problem makes some apps not working, or the high cpu load makes some app not working.
March 10, 2021 at 3:04 am #8466JWParticipantA regular error appeared every day at around 00:00, but doesn’t look like the cause.
can I avoid this error by refresh the web regularly, e.g. every 1 or 12 or 24 hour(s)?
2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Initialize common web application data 2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Connect to SCADA-Server "localhost" 2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Refresh the tables of the configuration database 2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill input channels properties 2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill output channels properties 2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill input channel statuses properties 2021-02-21 00:00:43 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:47 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:47 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:48 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:48 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:49 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:50 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:50 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:51 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:51 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:52 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:52 <opticalsensing><www-data><ACT> User information has been added. IP address: ::1. Session: 036AB7C0E285F5A1829AE338 2021-02-21 00:00:52 <opticalsensing><www-data><ACT> Login without a password: lhp_admin (Dispatcher). IP address: ::1 2021-02-21 00:00:52 <opticalsensing><www-data><ACT> User information has been updated. IP address: ::1. Session: 036AB7C0E285F5A1829AE338 2021-02-21 00:00:52 <opticalsensing><www-data><ACT> Retrieve components from the installed plugins 2021-02-21 00:00:52 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:53 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:53 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:54 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 2021-02-21 00:00:54 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1: Scada.ScadaException: User not logged on. at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0
March 10, 2021 at 11:45 am #8479MikhailModeratorWill it effect scada if I kill the www-data PID?
Server and Communicator continue work. So you can try killing the process.
First, try restarting Apache by restart_apache.shError getting events by the filter where channels= , view id=1:
Scada.ScadaException: User not logged on.JavaScript on a client page requests for data, but user is logged out. This is not a cause likely.
Usually when user is logged out, he is redirected to Login.aspx automatically. For some reason he was not redirected. To stop this error, a user should close a webpage or navigate to another page.
March 10, 2021 at 11:47 am #8480MikhailModeratorI faced that Mono hangs after heavy operation like opening a chart for a long period.
We will get rid of Mono and move to .NET5.Can you reproduce CPU load?
March 10, 2021 at 11:49 am #8481MikhailModeratorNote: Mono may work incorrectly if you open the web app by local browser and also open it remotely by IP address. It’s better to use Linux without GIU.
March 10, 2021 at 3:50 pm #8483JWParticipantAbout the mono issue
I tried, but haven’t find a way to reproduce it.I disabled chart plotting and hide minute data export. So there should be one or more cause other than these 2.
It happened to one of my server on AWS without GUI a few times. But after I reinstall the whole server, this issue haven’t appear in last 2 months.
I am going to make a program to monitor the cpu usage by mono, try if I can capture what cause the issue.
about to the error log above
What’s the proper way to have a client showing the scada page 7×24?
when first login:
– checked “remember me”
– autologin not installed
After a long time, the browser seem lost the authentication:
– the current page data is still refreshing
– while navigate to other view, the page said user do not have right to access
– the error log above appears every day 00:00 ever since
– after refresh the whole page by F5, all view can be accessedHow long does the browser lose the authentication? Should I have the browser refresh the page regularly to keep the authentication valid?
March 11, 2021 at 2:31 pm #8493MikhailModeratorI disabled chart plotting and hide minute data export. So there should be one or more cause other than these 2.
Good idea.
I am going to make a program to monitor the cpu usage by mono, try if I can capture what cause the issue.
Probably there should be utilities to read CPU load, provide by SNMP and read by Rapid SCADA.
March 11, 2021 at 2:34 pm #8494MikhailModeratorWhat’s the proper way to have a client showing the scada page 7×24?
It depends more on web server. For example, by default Windows IIS restarts application pool every certain period. It’s possible to disable restarting.
I haven’t heart that Apache also restarts something. Anyway, after web app restart, you will see break lines (——–) in ScadaWeb.log and then
2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Initialize common web application data
How regular such text is in the log?March 11, 2021 at 4:45 pm #8497JWParticipantevery day midnight
March 11, 2021 at 4:58 pm #8498JWParticipantlog from scadaweb, seems reloading every midnight
2021-03-06 00:00:29 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-07 00:00:25 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-08 00:00:25 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-09 00:00:25 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-10 00:00:11 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-11 00:00:29 <opticalsensing><www-data><ACT> Initialize common web application data 2021-03-12 00:00:22 <opticalsensing><www-data><ACT> Initialize common web application data
log from apache2, reloading every mid night too…
Mar 05 00:00:27 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 05 00:00:28 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 06 00:00:25 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 06 00:00:25 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 07 00:00:20 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 07 00:00:21 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 08 00:00:21 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 08 00:00:21 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 09 00:00:21 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 09 00:00:21 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 10 00:00:07 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 10 00:00:07 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 11 00:00:26 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 11 00:00:26 opticalsensing systemd[1]: Reloaded The Apache HTTP Server. Mar 12 00:00:18 opticalsensing systemd[1]: Reloading The Apache HTTP Server. Mar 12 00:00:18 opticalsensing systemd[1]: Reloaded The Apache HTTP Server.
March 11, 2021 at 5:22 pm #8499JWParticipantI found the cause, it was logrotate service.
the original conf includes reloading apache since the hanlde of log file is changed after logrotate. then it has to reload apache to write to new handle.
/var/log/apache2/*.log { daily missingok rotate 14 compress delaycompress notifempty create 640 root adm sharedscripts postrotate if invoke-rc.d apache2 status > /dev/null 2>&1; then \ invoke-rc.d apache2 reload > /dev/null 2>&1; \ fi; endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript }
I’m testing conf below. “copytruncate” copy to a new file but keeps the old file and truncate old file.
/var/log/apache2/*.log { copytruncate daily missingok rotate 14 compress delaycompress notifempty }
March 12, 2021 at 2:39 pm #8504MikhailModeratorInteresting. Reloading the entire web server just to start new log…
Does the new approach stop reloading? -
AuthorPosts
- You must be logged in to reply to this topic.