where it only happens sometimes, i would guess they are uploading a large file and the max execution time is being excedded, or the post max size is being exceeded.
i would try changing:
<?php
// WA Set Server Timeout
if(abs($WA_DFP_UploadStatus["WA_UploadResult1"]["statusCode"]) != 1){
set_time_limit ("300");
}
?>
to:
<?php
// WA Set Server Timeout
if(abs($WA_DFP_UploadStatus["WA_UploadResult1"]["statusCode"]) != 1){
set_time_limit (0);
?>
and try changing the post max size in the php.ini file.