0

I built a web application on a cloud PaaS which let me use Spring MVC. I was told that the underlying software is tomcat 7.0.

I have found that the server will not upload large files and I then changed the file upload size limit from 3M to 10M. Then when I upload a 5-6M file, the page failed after exactly 1 minute on both Chrome and IE. I was able to upload 3.6M file sometimes, but due to my broadband upload speed it sometimes fails as well if exceeds 1 minute.

So where do I change this timeout?

Nebula Era
  • 263
  • 2
  • 10
  • Are you sure its a timeout and not still hitting the file size limit (or something else)? Can you see an timeout exception in the logs when your request fails? – nickdos Oct 20 '14 at 02:35
  • Yes. a 3.5M file can sometimes be uploaded within just 59 seconds, but fail sometimes right at 60 seconds. A 6M file fails right at 60 seconds. – Nebula Era Oct 20 '14 at 14:43

1 Answers1

1

Taken from https://stackoverflow.com/a/18543887/249327:

Edit server.xml:

<Connector port="8080" protocol="HTTP/1.1" URIEncoding="UTF-8"
   connectionUploadTimeout="36000000" disableUploadTimeout="false"
   connectionTimeout="60000" redirectPort="8443" />

Note the value of false is counter intuitive - false will result in the upload timeout being disabled (ignored).

Community
  • 1
  • 1
nickdos
  • 8,348
  • 5
  • 30
  • 47
  • Thanks, but I couldn't see how to control tomcat since it's a PaaS that just needs me to upload the source code and it will compile for me. Is there a way to change it by coding? – Nebula Era Oct 20 '14 at 00:58
  • Sorry I missed that detail. I'm not aware of how else to do this. – nickdos Oct 20 '14 at 02:24