diff --git a/conf/server-base.conf b/conf/server-base.conf index 697226f9f..9284fe1cf 100644 --- a/conf/server-base.conf +++ b/conf/server-base.conf @@ -22,7 +22,7 @@ proxy_set_header Transfer-Encoding $http_transfer_encoding; location / { proxy_pass http://web_app_server; - limit_req zone=webapp burst=10 nodelay; + #limit_req zone=webapp burst=10 nodelay; } location /realtime { @@ -42,7 +42,7 @@ location /v1/ { client_max_body_size 20G; - limit_req zone=api burst=5 nodelay; + #limit_req zone=api burst=5 nodelay; } location /c1/ { @@ -54,7 +54,7 @@ location /c1/ { proxy_read_timeout 2000; proxy_temp_path /var/log/nginx/proxy_temp 1 2; - limit_req zone=api burst=5 nodelay; + #limit_req zone=api burst=5 nodelay; } location /static/ { diff --git a/util/queuemetrics.py b/util/queuemetrics.py index c1ca8c585..017048de4 100644 --- a/util/queuemetrics.py +++ b/util/queuemetrics.py @@ -12,6 +12,7 @@ class NullReporter(object): class QueueingCloudWatchReporter(object): + """ QueueingCloudWatchReporter reports metrics to the "SendToCloudWatch" process """ def __init__(self, request_queue, namespace, need_capacity_name, build_percent_name): self._namespace = namespace self._need_capacity_name = need_capacity_name @@ -35,6 +36,8 @@ class QueueingCloudWatchReporter(object): class SendToCloudWatch(Process): + """ SendToCloudWatch loops indefinitely and pulls metrics off of a queue then sends it to + CloudWatch. """ def __init__(self, request_queue, aws_access_key, aws_secret_key): Process.__init__(self) self._aws_access_key = aws_access_key @@ -43,12 +46,15 @@ class SendToCloudWatch(Process): self.daemon = True def run(self): - logger.debug('Starting cloudwatch sender process.') + logger.debug('Starting CloudWatch sender process.') connection = boto.connect_cloudwatch(self._aws_access_key, self._aws_secret_key) while True: put_metric_args, kwargs = self._put_metrics_queue.get() - logger.debug('Got queued put metrics reqeust.') - connection.put_metric_data(*put_metric_args, **kwargs) + logger.debug('Got queued put metrics request.') + try: + connection.put_metric_data(*put_metric_args, **kwargs) + except: + logger.exception('Writing to CloudWatch failed') class QueueMetrics(object):