This is an indication that the flock
mechanism (locking files for writing) does not work reliably. As a result the file gets written to twice.
In your core/config/config.inc.php file, you can try adding use_flock
to the $config_options
array:
$config_options = array(
'use_flock' => false,
);
That will make MODX use a different method for file locking, which may work more reliably, especially on hosts with networked harddisks.