Skip to content

Commit

Permalink
Merge branch 'main' into support/3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dsuch committed Nov 24, 2023
2 parents 93f530a + 115665b commit 60099b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/zato-agent/src/zato/agent/load_balancer/server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

"""
Copyright (C) 2021, Zato Source s.r.o. https://zato.io
Copyright (C) 2022, Zato Source s.r.o. https://zato.io
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
Expand Down Expand Up @@ -30,7 +30,7 @@
# Zato
from zato.agent.load_balancer.config import backend_template, config_from_string, string_from_config, zato_item_token
from zato.agent.load_balancer.haproxy_stats import HAProxyStats
from zato.common.api import MISC, TRACE1, ZATO_OK
from zato.common.api import HAProxy, MISC, TRACE1, ZATO_OK
from zato.common.haproxy import haproxy_stats, validate_haproxy_config
from zato.common.py23_.spring_ import RequestHandler, SimpleXMLRPCServer, SSLServer
from zato.common.repo import RepoManager
Expand Down Expand Up @@ -94,7 +94,10 @@ def _re_start_load_balancer(self, timeout_msg, rc_non_zero_msg, additional_param
""" A common method for (re-)starting HAProxy.
"""
additional_params = additional_params or []
command = [self.haproxy_command, '-D', '-f', self.config_path, '-p', self.haproxy_pidfile]
command = [
self.haproxy_command, '-D', '-m', HAProxy.Default_Memory_Limit,
'-f', self.config_path, '-p', self.haproxy_pidfile
]
command.extend(additional_params)
timeouting_popen(command, 5.0, timeout_msg, rc_non_zero_msg)

Expand Down
6 changes: 6 additions & 0 deletions code/zato-common/src/zato/common/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,12 @@ class Wrapper_Type:
# ################################################################################################################################
# ################################################################################################################################

class HAProxy:
Default_Memory_Limit = '4096' # In megabytes = 4 GB

# ################################################################################################################################
# ################################################################################################################################

default_internal_modules = {
'zato.server.service.internal': True,
'zato.server.service.internal.apispec': True,
Expand Down

0 comments on commit 60099b1

Please sign in to comment.