build: set open file limit based on how many apps are being processed

When running `fdroid build --all` on a buildserver with thousands of apps,
it was frequently hitting the open file limit.  This increases the open
file limit based on how many apps are being process.  It is doubled to
provide a margin of safety.

There are probably open file leaks which ideally would be fixed, but this
is also useful to make things more resilient to all the random stuff apps
include in their build systems.
This commit is contained in:
Hans-Christoph Steiner 2017-11-28 10:39:35 +01:00
parent 19af92c982
commit 2b6825ccfd
2 changed files with 14 additions and 1 deletions

View file

@ -31,7 +31,6 @@ else
echo "No virtualization is used."
fi
sudo /bin/chmod -R a+rX /var/lib/libvirt/images
ulimit -n 2048
echo 'maximum allowed number of open file descriptors: ' `ulimit -n`
ls -ld /var/lib/libvirt/images
ls -l /var/lib/libvirt/images || echo no access