# Disable-the-gateway-service-log-for-farm-stabilization_686074613
## Introduction

The farm is down due to high I/O activity on gateway workers. To work around this issue, disable the gateway log file.

The scenario to be covered is platform high threads issue caused by too many log writes, it will not restart platform, it will cause the farm down as gateway will be hanging there due to pending threads.

This is a farm-level task.

## Required steps

1. Create a patch file named **gateway-disable-log-patch.yaml** with the following content.
	```
	spec:
	  template:
	    spec:
	      containers:
	        - name: gateway
	          env:
	            - name: GATEWAY_LOG_LEVEL
	              value: 'OFF'
	          command:
	            - sh
	            - -c
	            - |
	              cat /opt/apache-tomcat/conf/server.xml
	              sed -i "s/<Valve className=\"com.microfocus.maas.platform.runtime.CustomAccessLog\"/<\!-- <Valve className=\"com.microfocus.maas.platform.runtime.CustomAccessLog\"/" /opt/apache-tomcat/conf/server*.xml
	              sed -i "s/OUTGOING_ITEM_COUNT}r \"\/>/OUTGOING_ITEM_COUNT}r \"\/> -->/" /opt/apache-tomcat/conf/server*.xml
	              ls /opt/apache-tomcat/conf
	              cat /opt/apache-tomcat/conf/server.xml
	              /entrypoint.sh
	```
2. Apply the patch file on the bastion.
	```
	kubectl patch deployment -n <itsma-namespace> itom-xruntime-gateway --patch-file gateway-disable-log-patch.yaml
	```
