Hi all,

I am experiencing socket connection closed exception while trying 'upload
part operation' [1] of Amazon s3 connector. In direct call, the response
comes within 5 seconds. I increased the the timeout values as below.

synapse.global_timeout_interval - 180 seconds in synapse.properties
http.socket.timeout - 180 seconds in passthru-http.properties
http.socket.timeout.receiver - 180 seconds in nhttp.properties

After this tuning also, no improvement. It waits for nearly 21 seconds. But
not receiving the response from API. [2] is the message I get.

Finally I set the endpoint timeout [3] also. But the result is same.

[1]
http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html

<http://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html>
[2]
<Error>
    <Code>RequestTimeout</Code>
    <Message>Your socket connection to the server was not read from or
written to within the timeout period. Idle connections will be
closed.</Message>
    <RequestId>7223E45B22E88E80</RequestId>

<HostId>cH2RE4IG7QhmiN1Bpqw6/bweEKowmtXS+jFwJkzay/3u3MovuutgtzAXM37tpXuzCl23HxAYuZIF1rLGLuJxvh4GRAu6891c</HostId>
</Error>

[3]
<call blocking="true">
    <endpoint>
        <http method="put"
uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}&amp;uploadId={+uri.var.uploadId}">
            <timeout>
                <duration>180000</duration>
                <responseAction>fault</responseAction>
            </timeout>
        </http>
    </endpoint>
</call>

[4] Template:

<template name="uploadPart" xmlns="http://ws.apache.org/ns/synapse";>
    <parameter name="bucketUrl" description="The URL of the bucket without
the http prefix."/>
    <parameter name="objectName" description="The name to give for the
newly created object."/>
    <parameter name="uploadId" description="This specifiy the ID of the
initiated multipart upload."/>
    <parameter name="partNumber" description="This specifiy the number or
the index of the uploaded part."/>
    <sequence>
        <property name="uri.var.bucketUrl" expression="$func:bucketUrl"/>
        <property name="uri.var.objectName" expression="$func:objectName"/>
        <property name="uri.var.uploadId" expression="$func:uploadId"/>
        <property name="uri.var.partNumber" expression="$func:partNumber"/>
        <!-- Force ESB to send the content length to the AmazonS3 API -->
        <property name="FORCE_HTTP_CONTENT_LENGTH" value="true"
scope="axis2"/>
        <property name="COPY_CONTENT_LENGTH_FROM_INCOMING" value="true"
scope="axis2"/>
        <call>
            <endpoint>
                <http method="put"

uri-template="{uri.var.bucketUrl}/{+uri.var.objectName}?partNumber={+uri.var.partNumber}&amp;uploadId={+uri.var.uploadId}"/>
            </endpoint>
        </call>
        <!-- Remove response custom header information -->
        <header name="x-amz-id-2" scope="transport" action="remove"/>
        <header name="x-amz-request-id" scope="transport" action="remove"/>
        <header name="Via" scope="transport" action="remove"/>
        <header name="x-amz-server-side-encryption" scope="transport"
action="remove"/>
    </sequence>
</template>


Thank you
-- 
Shakila Sivagnanarajah
Software Engineer
Mobile :+94 (0) 768 856837
[email protected]
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to