TCPSysLogSocket logic

1 0 332

If you have syslog configured in the MessageLogging policy (http://docs.apigee.com/api-services/reference/message-logging-policy), you may have noticed the below line in the Message-processor system log.

log statement:

2017-05-18 10:56:26,007 org:$orgname env:$envname api:$APIproxyname rev:2 messageid:prodgw501-31198-98748-4  Apigee-Main-86 WARN  c.a.s.TCPSysLogSocket - TCPSysLogSocket.log() : Dropping syslog message for Queue syslog.example.com/10.19.3.105:9009 Size=5000 Consumers=6 Dropped messages=162663 Sent messages=34744.

Let see how to interpret that statement or what happens in the background,

Sent messages : sent messages to a syslog server per host from the start of the MP.

Dropped messages : No of messages that were dropped as the queue was full and this has nothing to do with the HTTP response codes > 4XX transactions.

Size : queue size, max size is 5000. (Cannot be configured as of now) .

#1 If the send message fails, the message is put back to the queue to be tried later until the q becomes empty for every 50 ms and if the resend fails, they are put to queue back again.

#2 If we cannot write to the host for 120 seconds, a queue is dropped and all the messages are lost, the size becomes zero and dropped messages count increases by queue size.
You should see the below statement if this happens

TCPSysLogSocket$Queue.updateFail() : Failed to send for 120 seconds dropping 3452

#3 If size = 5000, we see dropped messages and if the size < 5000, the messages will be resent and will be added back to the queue if resend fails as per #1.

PS: The above is based on my observations.

Version history
Last update:
‎06-06-2017 12:52 AM
Updated by: