• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx

  • We are developing a new feature in Plesk that will help you promote your websites or business on social media. We want to conduct a one-hour online UX test to present the prototype and collect feedback. If you are interested in the feature, please book a meeting via this link.
    Thank you in advance!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Error in statistics, logs duplicated

JuanCar

Regular Pleskian
Hello
I'm using centos 5 and plesk 11.5.3
I received an email about over use of resources in one of the domains in my server. I entered in the domain panel and I see that logs size is 94,5 Gb, but if I look use of resources in the control panel of the server I see that this domain is using an space of disk less tan this figure.
I claculated the size of logs file and I got half of the reported size!!! (about 47 Gb).
I've noticed that logs files are stored in two folders
For domain:
/var/www/vhosts/domain.td/logs/
/var/www/vhosts/system/domain.td/logs/

For subdomains

/var/www/vhosts/domain.td/logs/subdomain.domain.com/
/var/www/vhosts/system/subdomain.domain.td/logs

why does plesk duplicate the logs?

I examined conf file and I find customlog directive pointed to /var/www/vhosts/system/subdomain.domain.td/logs.

Any explanation?
Thanks
 
Add more data about this problem:
I know /vhosts/domain.td/logs/subdomain.domain.td is the old log folder before plesk 11.5, but I wonder why is it updated in the new versión? I've look every conf file and I can't find any directive telling apache to use this old directory for logs... so why are these logs file updated? Can I delete them?
 
I got today to this same issue in plesk 12. I have the same duplicate log files under vhosts/domain/logs and vhosts/system/domain/logs and can't figure out why this happens.

Did you find anything out?
 
Hello everyone!

I too have this problem on many of the domains on my server. Domains created after the upgrade to version 11.5 are created correctly, with the path of the log in /system/ folder only.

Domains created previously, instead, in addition to storing the logs in the /system/ folder, have also maintained the previous path.

Now, the important question is to know how we can avoid double storage.
The command to reconfigure the domain is sufficient to correct it?
Can we simply delete the folders /logs/ in the old paths (outside /system/)?
Should some other operation be done?

I would like to avoid having to add a therabyte of disk space just to store duplicate log files... :p

Parallels please enlighten us! :D
 
I am having the same issue in Plesk 11.5

Except, for me, all domains, regardless of when they were created, maintain logs in both the domain folder (/var/www/vhost/thedomain.com/logs), AND in the system folder (/var/www/vhost/system/thedomain.com/logs)

This is extremely problematic as it seems that only one set of logs is being rotated...

Please help!

EDIT:

Well, in order to patch this growing log problem, i went in the folder:
/usr/local/psa/etc/logrotate.d/
and edited each config file (one per domain, usually)
and added both locations, so each config file looks like this (it seems like it sticks even if you change the log rotation settings in Plesk):
Code:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
/var/www/vhosts/thedomain.com/statistics/logs/*.processed {
    size=1048576
    rotate    1
    compress
    missingok
}
/var/www/vhosts/thedomain.com/statistics/logs/error_log {
    size=1048576
    rotate    1
    compress
    missingok
    copytruncate
}
/var/www/vhosts/system/thedomain.com/logs/access_log {
    size=1048576
    rotate    1
    compress
    missingok
    copytruncate
}



#added by me
/var/www/vhosts/thedomain.com/logs/*.processed {
    size=1048576
    rotate    1
    compress
    missingok
}
/var/www/vhosts/thedomain.com/logs/error_log {
    size=1048576
    rotate    1
    compress
    missingok
    copytruncate
}

/var/www/vhosts/thedomain.com/logs/access_log {
    size=1048576
    rotate    1
    compress
    missingok
    copytruncate
}
 
Last edited:
We finally found out what's causing the issue: the log files in

/var/www/vhost/thedomain.com/logs
and
/var/www/vhost/system/thedomain.com/logs

are hard links.

More about hard links: https://en.wikipedia.org/wiki/Hard_link
More about Plesk using hard links since v11.5: http://blogs.reliablepenguin.com/2013/10/08/plesk-11-5-and-apache-log-files

To check if your logs are hard linked:
Open both folders via ssh, do "ls -i" and check the unique file id for each file – if they match, these are hard links.

I hope this helps you to solve your issues.

Have a nice weekend!

(By the way: we're running Plesk 12.0.18, Update #53 on CentOS 5.11)
 
I think you have it backwards:

They're *supposed* to be hard links!

The problem arises when they are not!

if they were hard links, rotating logs in one would reflect in the other, and there would be no duplication of space used...
But that is *not* the case, rotating logs in one changes nothing in the other...
 
Was this ever solved at all? I started wondering why my disk were running full and my system slow, and discovered duplicate log files just like described here. I truncated them in one location, but they keep growing in the /system/ directory, so they are not hard links. Fix please? I could just replace them with hard or symbolic links, but I'm not even sure which location should have the original, and if that plays a role for auto-truncations etc.

I URGENTLY need a fix for this.
 
Back
Top