From 9994b6b8ddd97566897bcc573e86d39ae447353d Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 12 Jan 2016 15:54:05 -0800 Subject: [PATCH] Increases the number of file descriptors available to the process in order to hit a issue when doing restore where we were running out of file descriptors during the build. --- scripts/build/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build/build.sh b/scripts/build/build.sh index 585edc7417..dbe0ea6ef8 100755 --- a/scripts/build/build.sh +++ b/scripts/build/build.sh @@ -24,6 +24,15 @@ header "Checking Pre-Reqs" $REPOROOT/scripts/test/check-prereqs.sh +header "Adjusting file descriptors limit, if necessary" +# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore +FILE_DESCRIPTOR_LIMIT=$( ulimit -n ) +if [ $FILE_DESCRIPTOR_LIMIT -lt 512 ] +then + info "Increasing file description limit to 512" + ulimit -n 512 +fi + header "Restoring Tools and Packages" if [ ! -z "$OFFLINE" ]; then