- Server operating system version
- CentOS Linux 7.9.2009
- Plesk version and microupdate number
- 18.0.74 #2
Hello,
I'm facing a persistent issue where the daily statistics processing and log rotation fails every night. This started happening a few days ago after server maintenance that involved multiple reboots.
Symptoms:
1. The web server log file access_ssl_log.processed.1.gz is not being updated. Its timestamp is several days old.
2. Every morning, I find that the access_ssl_log.processed file has been recreated with a size of 0 bytes.
3. As a result, all log data from the previous day is lost, and any scripts that rely on these rotated logs fail to run.
Root Cause Analysis:
I've traced the issue to a critical error in the Plesk panel log (/var/log/plesk/panel.log). Every night at the exact time of the failure (approx. 03:27 AM), the following error is logged:
[2025-12-04 03:27:18.054] ERR [panel] A table must have a primary key, but none was found for table 'statisticsMeasurement'
This error seems to halt the daily maintenance script, preventing it from processing and rotating the logs.
Troubleshooting Steps Performed:
Based on this error, I have tried the standard repair procedures, but they have not solved the problem:
1. I forced the daily maintenance script by running plesk daily -f. The command completes, but the logs are still not rotated.
2. I ran the database repair utility plesk repair db. The command reports that everything is [OK] and finds no errors to resolve.
[root@server ~]# plesk repair db
Checking the Plesk database using the native database server tools .. [OK]
Checking the structure of the Plesk database ........................ [OK]
Checking the consistency of the Plesk database ...................... [OK]
Error messages: 0; Warnings: 0; Errors resolved: 0
Conclusion:
There is a clear conflict: the panel.log proves that a core process is failing due to a missing primary key in the psa database, but the plesk repair db tool is unable to detect or fix this specific issue.
Since the automatic repair tool is not working, I am looking for guidance on how to safely resolve this database schema problem. My ultimate goal is to get the daily log rotation working again.
How can I repair the statisticsMeasurement table to unblock the daily maintenance script, especially when plesk repair db fails to see the issue?
Thank you for your assistance.
MCV
I'm facing a persistent issue where the daily statistics processing and log rotation fails every night. This started happening a few days ago after server maintenance that involved multiple reboots.
Symptoms:
1. The web server log file access_ssl_log.processed.1.gz is not being updated. Its timestamp is several days old.
2. Every morning, I find that the access_ssl_log.processed file has been recreated with a size of 0 bytes.
3. As a result, all log data from the previous day is lost, and any scripts that rely on these rotated logs fail to run.
Root Cause Analysis:
I've traced the issue to a critical error in the Plesk panel log (/var/log/plesk/panel.log). Every night at the exact time of the failure (approx. 03:27 AM), the following error is logged:
[2025-12-04 03:27:18.054] ERR [panel] A table must have a primary key, but none was found for table 'statisticsMeasurement'
This error seems to halt the daily maintenance script, preventing it from processing and rotating the logs.
Troubleshooting Steps Performed:
Based on this error, I have tried the standard repair procedures, but they have not solved the problem:
1. I forced the daily maintenance script by running plesk daily -f. The command completes, but the logs are still not rotated.
2. I ran the database repair utility plesk repair db. The command reports that everything is [OK] and finds no errors to resolve.
[root@server ~]# plesk repair db
Checking the Plesk database using the native database server tools .. [OK]
Checking the structure of the Plesk database ........................ [OK]
Checking the consistency of the Plesk database ...................... [OK]
Error messages: 0; Warnings: 0; Errors resolved: 0
Conclusion:
There is a clear conflict: the panel.log proves that a core process is failing due to a missing primary key in the psa database, but the plesk repair db tool is unable to detect or fix this specific issue.
Since the automatic repair tool is not working, I am looking for guidance on how to safely resolve this database schema problem. My ultimate goal is to get the daily log rotation working again.
How can I repair the statisticsMeasurement table to unblock the daily maintenance script, especially when plesk repair db fails to see the issue?
Thank you for your assistance.
MCV