Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing of multipart-form-data-requests are getting failed due to time out issues on WSO2 API Manager & Integrator #5177

Closed
rajudevansh opened this issue Jul 2, 2020 · 10 comments
Labels
IceBox Older issues that are not being actively worked on but may be revisited in the future.

Comments

@rajudevansh
Copy link

rajudevansh commented Jul 2, 2020

Steps to reproduce:
Created REST Service for transferring the file in the form of multipart/form-data in wso2 integrator.

Any recommendations: Is there any specific properties need to be set in WSO2 Integrator/API Manager for doing fileUpload using multipart/form-data?

Integrator Logs:

{org.apache.synapse.transport.passthru.util.DeferredMessageBuilder} - Error building message
org.apache.axis2.AxisFault: Processing of multipart/form-data request failed. Stream ended unexpectedly
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.builder.MultipartFormDataBuilder.processDocument(MultipartFormDataBuilder.java:96)
at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:153)
at org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:160)

Caused by: org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:351)
at org.apache.axis2.builder.MultipartFormDataBuilder.parseRequest(MultipartFormDataBuilder.java:137)
at org.apache.axis2.builder.MultipartFormDataBuilder.getParameterMap(MultipartFormDataBuilder.java:107)
at org.apache.axis2.builder.MultipartFormDataBuilder.processDocument(MultipartFormDataBuilder.java:91)
... 37 more
Caused by: org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:1005)
at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:903)
at java.io.InputStream.read(InputStream.java:101)

Environment: WSO2 API Manager 2.2.0/ WSO2 Integrator 6.2

Please provide any suggestions for resolving the issues.

@Nirothipan @Vathsan @sdkottegoda

@Nirothipan
Copy link
Member

Nirothipan commented Jul 4, 2020

@rajudevansh
Copy link
Author

Thanks @Nirothipan for responding. We have followed the URL and implemented ESB proxy service for processing multipart/form-data file.

We have added following property for processing through proxy service

We have created new API in API Manager for invoking this integrator service and observed time out issues when we are hitting this service.

Can you please check and let me know any specific properties need to be added in WSO2 Integrator/API Manager for doing fileUpload using multipart/form-data or improving the performance?

@Nirothipan
Copy link
Member

The timeout issues consistent or intermittent ?

@rajudevansh
Copy link
Author

Timeout issues which we are facing now are intermittent.

@Nirothipan
Copy link
Member

It might be related to back end as well , could you try disabling keep alive and check

@rajudevansh
Copy link
Author

I didn't get Nirothipan. Can you please explain what exactly you want me to try ?

@Nirothipan
Copy link
Member

I didn't get Nirothipan. Can you please explain what exactly you want me to try ?

Please try adding the following to service , but we need to find the real issue of timeout.

<property name="NO_KEEPALIVE" value="true" scope="axis2"/>

@rajudevansh
Copy link
Author

Thanks @Nirothipan for your details. We will try this and let you know.

@OdDev26
Copy link

OdDev26 commented Mar 28, 2022

@Nirothipan, I am trying to receive a multipart file from the backend into WSO2 ESB, do you know how I can go about it?

@shuimuxh
Copy link

@rajudevansh did you find the root cause for this issue? I think you can have a try to increase the global timeout which maybe interrupt the session when you upload big file.

@anupama-pathirage anupama-pathirage added the IceBox Older issues that are not being actively worked on but may be revisited in the future. label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IceBox Older issues that are not being actively worked on but may be revisited in the future.
Projects
None yet
Development

No branches or pull requests

5 participants