FreePBX Backup errors "Cannot write: Broken pipe"

Any thoughts on the following errors that pop up during a scheduled but manually run backup/restore using SSH from a production server to a hot spare? The distro version is 2.210.62-5

Restoring astDB... PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 352 bytes) in /var/www/html/admin/modules/backup/bin/restore.php on line 310

and seemingly random files (about 100-200) from /tftpboot and /var/…, although they appear to actually restore just fine - they exist with a current timestamp:

/bin/tar: ./tftpboot/ht_487_.bin: Cannot write: Broken pipe /bin/tar: ./tftpboot/SoundPointIPLocalization/Slovenian_Slovenia/SoundPointIP-dictionary.xml: Cannot write: Broken pipe /bin/tar: ./var/cache/aastra/pictures/Aastra.gif: Cannot write: Broken pipe /bin/tar: ./var/spool/asterisk/voicemail/default/233/greet.wav: Cannot write: Broken pipe /bin/tar: ./var/lib/asterisk/sounds/custom/temporary-message-saved.wav: Cannot write: Broken pipe /bin/tar: Exiting with failure status due to previous errors Running post-backup hooks... Backup successfully completed!

Broken pipe

Did you contact a plumber?

I would check your relevant php.ini for it’s limits:-

; Resource Limits ;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = XXXM

Maybe XXX is not big enough, and big files take a long time to process so caveate implementor

Thanks Scott, always the fountain of knowledge!

I upped the PHP mem from 128M to 512M, didn’t help. The issues appear to be a result of adding some directories for backup:

When I remove those directories the errors goes away - including the /var/spool/asterisk/voicemail ones. Hmm…

Did you also try increasing upload file size?

Set upload_max_filesize = 500M, no difference.

You can put at top of the script this: ini_set(“memory_limit”,“500M”);