While replicating from server A to server B, individual replication requests such as PUT requests may hang and remain unhandled for a while if server B is under a high load. When this scenario occurs, the logs on server A (the replicating server) may show "Refusing the queue replication event for.... queue is full".
This error refers to the replication queue, which is dynamically built during the replication. The recommended way to minimize the occurrence of this error is by increasing the "maxThreads" parameter on the Tomcat HTTP connector, located at $TOMCAT_HOME/conf/server.xml:
<Connector port="8081" maxThreads="x"/>
When the parameter is not specified, it defaults to 200.
This parameter determines the maximal number of request handling threads. In the above-mentioned scenario, server B is under a high load caused by the incoming PUT requests from server A, which results in the replication queue on server A filling up with requests that are waiting to be handled.
Active thread-monitoring can be achieved with JConsole. There is more information here.
The replication queue size can also be increased with the "artifactory.replication.event.queue.size" system property. By default, this property is not specified in the artifactory.system.properties file ($ARTIFACTORY_HOME/etc/artifactory.system.properties), so it is necessary to add the property. The default value is 50,000, it can multiplied by a number of times if required. Although we stop short of recommending this second approach, it is an option.