Installation SVN timeout and retry - OPEN

Forums > Bug Posts > Installation SVN timeout and retry - OPEN

Post #1
Per recommendation add: '--config-option servers:global:http-timeout=0' to prevent SVN request hangups. Also to prevent imminent failure from adding quick timeouts we need to add a retry function:
[code]
%pre

# Define variables for the SVN command and retry configuration
SVN_COMMAND="<your_svn_command_here>"
MAX_RETRIES=3
RETRY_COUNT=0

# Retry the SVN command
retry_svn_command() {
  while  [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
$SVN_COMMAND
    EXIT_CODE=$?

    if  [ $EXIT_CODE -eq 0 ]; then
      echo "RazDC  SVN request succeeded."
      break
    else
      echo  "RazDC SVN request failed (exit code: $EXIT_CODE). Retrying..."
      RETRY_COUNT=$((RETRY_COUNT + 1))
    fi
done

  if [ $RETRY_COUNT  -ge $MAX_RETRIES ]; then
    echo  "Maximum retries reached. RazDC SVN request failed."
    exit 1
  fi
}

retry_svn_command

%end
  [/code]
Bryan King

Sorry, this topic is not accepting new posts.