Simon
Simon

Reputation: 337

How to change the max size for file upload on AOLServer/CentOS 6?

We have a portal for our customers that allow them to start new projects directly on our platform. The problem is that we cannot upload documents bigger than 10MO.

Every time I try to upload a file bigger than 10Mo, I have a "The connection was reset" error. After some research it seems that I need to change the max size for uploads but I don't know where to do it. I'm on CentOS 6.4/RedHat with AOL Server. Language: TCL.

Anyone has an idea on how to do it?

EDIT

In the end I could solve the problem with the command ns_limits set default -maxupload 500000000.

Upvotes: 1

Views: 173

Answers (2)

TrojanName
TrojanName

Reputation: 5365

I see that you are running Project Open. As well as setting the maxinput value for AOLserver, as described by mrcalvin, you also need to set 2 parameters in the Site Map:

  • Attachments package: parameter "MaximumFileSize"
  • File Storage package: parameter "MaximumFileSize"

These should be set to values in bytes, but not larger than the maxinput value for AOLserver. See the Project Open documentation for more info.

In the case where you are running Project Open using a reverse proxy, check the documentation here for Pound and here for Nginx. Most likely you will need to set a larger file upload limit there too.

Upvotes: 2

mrcalvin
mrcalvin

Reputation: 3434

In your config.tcl, add the following line to the nssock module section:

 set max_file_upload_mb 25
 # ...      
 ns_section ns/server/${server}/module/nssock
     # ...
     ns_param maxinput [expr {$max_file_upload_mb * 1024 * 1024}]
     # ...

It is also advised to constrain the upload times, by setting:

 set max_file_upload_min 5
 # ...      
 ns_section ns/server/${server}/module/nssock
     # ...
     ns_param  recvwait  [expr {$max_file_upload_min * 60}]

If running on top of nsopenssl, you will have to set those configuration values (maxinput, recvwait) in a different section.

Upvotes: 3

Related Questions