In this file, the error of a failed job will also be stored.
The default 32768 bytes are not very much.

This file is on the local filesystem so there is no filesystem
size restrictions like in /etc/pve.
---
 PVE/ReplicationState.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm
index 75d34ba..2bf4fc9 100644
--- a/PVE/ReplicationState.pm
+++ b/PVE/ReplicationState.pm
@@ -31,7 +31,8 @@ sub read_state {
 
     return {} if ! -e $state_path;
 
-    my $raw = PVE::Tools::file_get_contents($state_path);
+    # max file size = 1048476 = 1MB
+    my $raw = PVE::Tools::file_get_contents($state_path, 1048476);
 
     return {} if $raw eq '';
 
-- 
2.11.0


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to