Am attempting to upload files to a restful api. When attempting to upload a really large file like > 300MB I get a 500 error. Do I need to do something in server.xml to allow this to work? I do not see any error in the logs. It's like the request never makes it to the server.
It may be that this is related to how long the request takes as opposed to the size of the file. Any request that lasts longer than 5 minutes appears to fail.
Answer by Chemi (409) | May 26, 2015 at 03:39 PM
I suffered same issues. It seems it is related with some Cloudfoundry limitations: http://docs.cloudfoundry.org/devguide/deploy-apps/large-app-deploy.html#consid_limits
The workaround I found was to deploy from Bluemix Devops Services. The deployment from my local machine was around 45 min and from Bluemix DevOp Services was 7 min and worked fine.
Hope this helps,
Chemi.
To be clear I am not trying to deploy an application. I have an existing application that I am trying to send files to. I upload files to an api endpoint. When the uploaded file gets above a certain size I get 500 errors. It seems to work fine with a 50MB file at around 300MB it fails every time.
Can you upload big files to your Liberty locally?
Are you using Servlet 2.0 or Servlet 3.x?
How does your REST endpoint look like where you take the file in?
Just a few things that pop in mind that might point to the problem
I can use a large file locally. I am using JAX_RS. This seems to be related to the amount of time a request takes not the size of the file.
For example if I send a request like this:
curl -k -v --data-binary @c:\54MB.zip -H "Content-Type: application/zip" -X POST "http://bluemixenpoint" > 54MB.log
As long as the request takes less than 5 minutes I get a 200 Ok. And I can use any file size as long as the request is less than 5 minutes.
If I force a request to take longer than 5 minutes the request fails with a 500 error for example
curl -k -v --limit-rate 170K --data-binary @c:\54MB.zip -H "Content-Type: application/zip" -X POST "http://bluemixenpoint" > 54MB.log
It seem to be that any request the takes longer than 5 minutes simply fails. The odd thing is I don't see anything in the logs.