mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #1029 from nextcloud/enh/noid/set-values-based-on-hardware
set max connections and max php children based on available hardware
This commit is contained in:
commit
7ddb60cce9
4 changed files with 18 additions and 6 deletions
|
|
@ -10,7 +10,7 @@ directory_empty() {
|
|||
[ -z "$(ls -A "$1/")" ]
|
||||
}
|
||||
|
||||
echo "Configuring Redis as session handler"
|
||||
echo "Configuring Redis as session handler..."
|
||||
cat << REDIS_CONF > /usr/local/etc/php/conf.d/redis-session.ini
|
||||
session.save_handler = redis
|
||||
session.save_path = "tcp://${REDIS_HOST}:${REDIS_HOST_PORT:=6379}?auth=${REDIS_HOST_PASSWORD}"
|
||||
|
|
@ -21,6 +21,11 @@ redis.session.lock_retries = -1
|
|||
redis.session.lock_wait_time = 10000
|
||||
REDIS_CONF
|
||||
|
||||
echo "Setting php max children..."
|
||||
MEMORY=$(mawk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
||||
PHP_MAX_CHILDREN=$((MEMORY/50))
|
||||
export PHP_MAX_CHILDREN
|
||||
|
||||
# Check permissions in ncdata
|
||||
touch "/mnt/ncdata/this-is-a-test-file"
|
||||
if ! [ -f "/mnt/ncdata/this-is-a-test-file" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue