atom feed2 messages in com.marklogic.developer.generalRe: [MarkLogic Dev General] Issue wit...
FromSent OnAttachments
Yalaverthi, Sudheer (LNG-RDU)Jan 9, 2018 9:36 am 
Ron HitchensJan 9, 2018 10:21 am 
Subject:Re: [MarkLogic Dev General] Issue with XCC - Error parsing HTTP headers: Premature EOF, partial header line read: ''
From:Ron Hitchens (ro@ronsoft.com)
Date:Jan 9, 2018 10:21:05 am
List:com.marklogic.developer.general

That error message indicates that the network connection dropped before XCC could read the response from MarkLogic. That can happen when MarkLogic crashes while processing your request (extremely rare these days), or if the connection is broken for some other reason.

It looks like you’e running in AWS with ELBs. ELBs can and will drop the connection if it thinks a server is being unresponsive. The timeout defaults on ELBs can be quite short by default since they are optimized for lots of quick transactions.

Are your request running for more than a sec seconds? If so, you may be bumping against the max time and need to change (or have an AWS admin change) the timeout defaults for the ELBs in question.

---- Ron Hitchens ro@overstory.co.uk, +44 7879 358212

On January 9, 2018 at 5:36:47 PM, Yalaverthi, Sudheer (LNG-RDU) ( sudh@lexisnexis.com) wrote:

Hi,

I have a java program that makes MarkLogic calls using XCC api to fetch some data. Calls to MarkLogic from the same client with same adhoc query and input parameters runs successfully sometimes and fails sometimes.

Our ML cluster is in AWS and the client program is running from one of our on-prem unix boxes.

In a successful call, I see an entry like this in Elastic Load Balancer(ELB) access logs

2018-01-09T17:04:12.029671Z ELB-STACKNAME-MASKED CLIENTIP-MASKED:44606 TARGETIP-MASKED:9000 0.000489 0.000008 0.000013 - - 1440 1452 "- - - " "-" - -

and I can see corresponding entries in ML Access logs for 9000 port.

For a failed call, I see an entry like this

2018-01-09T17:04:46.682065Z ELB-STACKNAME-MASKED CLIENTIP-MASKED:36752 TARGETIP-MASKED:9000 0.000651 0.000011 0.000015 - - 0 0 "- - - " "-" - -

and no corresponding logs in 9000 port ML access log file.

From the ELB logs, the only difference between the successful and failed calls is the received_bytes and sent_bytes. For failed I see the bytes as 0 though I am making the exact same call that had succeeded earlier.

For failure scenario, I see WARNINGs like below and finally an error

2018-01-09 10:33:02.220 WARNING [1] (AbstractRequestController.runRequest): Error parsing HTTP headers: Premature EOF, partial header line read: ''

2018-01-09 10:35:23.257 WARNING [1] (AbstractRequestController.runRequest): Error parsing HTTP headers: Premature EOF, partial header line read: ''

2018-01-09 10:37:42.264 WARNING [1] (AbstractRequestController.runRequest): Error parsing HTTP headers: Premature EOF, partial header line read: ''

2018-01-09 10:40:01.272 WARNING [1] (AbstractRequestController.runRequest): Error parsing HTTP headers: Premature EOF, partial header line read: ''

2018-01-09 10:42:22.328 WARNING [1] (AbstractRequestController.runRequest): Error parsing HTTP headers: Premature EOF, partial header line read: ''

2018-01-09 10:42:22.328 INFO [1] (AbstractRequestController.runRequest): automatic query retries (5) exhausted, throwing: com.marklogic.xcc.exceptions.ServerConnectionException: Error parsing HTTP headers: Premature EOF, partial header line read: ''

I am not quite sure what is causing this different behavior for the same program.

Any help is really appreciated.

Thanks,

Sudheer