mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
fix setting max connections
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
20892c2d40
commit
2e1e53e9d3
3 changed files with 8 additions and 3 deletions
|
|
@ -113,7 +113,9 @@ fi
|
|||
echo "Setting max connections..."
|
||||
MEMORY=$(mawk '/MemTotal/ {printf "%d", $2/1024}' /proc/meminfo)
|
||||
MAX_CONNECTIONS=$((MEMORY/50+3))
|
||||
sed -i "s|^max_connections =.*|max_connections = $MAX_CONNECTIONS|" "/var/lib/postgresql/data/postgresql.conf"
|
||||
if [ -n "$MAX_CONNECTIONS" ]; then
|
||||
sed -i "s|^max_connections =.*|max_connections = $MAX_CONNECTIONS|" "/var/lib/postgresql/data/postgresql.conf"
|
||||
fi
|
||||
|
||||
# Catch docker stop attempts
|
||||
trap 'true' SIGINT SIGTERM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue