Skip to content
Snippets Groups Projects
Commit beca53da authored by OpenLedger Servers's avatar OpenLedger Servers
Browse files

Don't hard-code the 'haf-world' docker-compose prefix in assisted startup.

Reduce the amount of total memory assisted startup requires before creating
a ramdisk to increase the chance that a 64G system will qualify.  Explicitly
set a maxconn limit for haproxy to prevent errors when running on systems
where max open file descriptors is set really high
parent 02e64ff7
No related branches found
No related tags found
1 merge request!85Don't hard-code the 'haf-world' docker-compose prefix in assisted startup.
Pipeline #118955 failed
......@@ -274,7 +274,7 @@ else
swap_location=$(swapon --show=NAME --noheadings)
if [[ $physical_memory -gt 60 && $free_memory -gt 30 && $NO_RAMDISK != 1 ]]; then
if [[ $physical_memory -ge 60 && $free_memory -gt 30 && $NO_RAMDISK != 1 ]]; then
echo "There is more than 64 gigabytes of RAM. Mounting shared_mem..."
if [ ! -d "/mnt/haf_shared_mem" ]; then
sudo mkdir /mnt/haf_shared_mem
......@@ -403,7 +403,7 @@ while read -r line; do
echo "Detected *PROFILE: Entered LIVE sync* in the output. Bringing down Docker Compose..."
entered_livesync=1
# Write Sync time to "haf.log" for tracking, as this log will get wiped on restart
docker logs haf-world-haf-1 | grep PRO > haf.log
docker compose logs haf | grep PROFILE > haf.log
# Write max memory and swap usage to "haf.log" for tracking
grep "max_mem=" startup.temp >> haf.log
grep "max_swap=" startup.temp >> haf.log
......
......@@ -6,6 +6,14 @@ global
presetenv SYNC_BROADCAST_BACKEND_SERVER api.hive.blog
presetenv SYNC_BROADCAST_BACKEND_PORT 443
presetenv SYNC_BROADCAST_BACKEND_SSL ssl
# maxconn needs to be set to handle our maximum expected load.
# Let's say we want to handle 10000 calls/second.
# Most of our API calls will timeout after 3 seconds. If we assume
# the worst case, where all of the calls take the full 3 seconds, we
# should expect 30000 calls in flight at any one time. We'll round up
# to 32768. In reality, the vast majority of calls should be handled
# in a few tens of milliseconds so this should be massive overkill.
maxconn 32768
# DEFAULTS
# do not put a defaults section here, the defaults section is included
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment