Maximum HTTP POST Request Size - Attention needed

Friday, November 13, 2015 4:18 PM UTC

Maybe it's just me but I think there are(were) others who struggled with this, too, so I decide to blog about it.
In Domino you can specify the maximum allowed size of an HTTP POST request in the server settings. There are however different approaches to do so. One may result in unexpected results regarding was is possible and what will cause errors that don't give you any detailed information about of what went wrong.

1. Using just the server document settings

When you start with a fresh installed Domino server you only have the server document settings available to tweak the HTTP server. You can find the relevant settings in the server document under "Internet Protocols, HTTP" and "Internet Protocols, Domino Web Engine". 
On the first page of those two you can find the "Maximum size if request content" at the very bottom right in the "HTTP Protocol Limits" section. It also says that a value of "0" means no limitation. That's true at some point.
The second setting can be found on the other tab in the "POST Data" section on the right. This value won't behave like the other one, so you should avoid setting a value of "0" here. 
This value "wins" against the other value you may have just set to "0". I think it's a redundant setting (the first value), but it gets even worse.

2. Using a global internet site document

Instead of using the global server settings you are able to define POST content sizes per domain your web server can host. For that you switch to "Load Internet configurations from Server/Internet Sites documents" on the "Basics" tab of your server document. If you do so, then you have to create at least a global internet site document.
When creating the internet site you can choose whether you want to create a global one or a domain/host specific site document. Let's start with the global one.
In the form you will also find the "Domino Web Engine" tab that you are used from the server document. Here is also a "POST Data" section that contains the "Maximum POST data" setting. Again, you are also allowed to set a value of "0" which also means "unlimited" size. However this will overwrite the setting in the server document. Therefore it's also hidden when you activate the usage of internet sites in the "Basics" tab. This is actually I was expecting
When you create a domain specific internet site document then you have to define a hostname for which this setting will be used. 

3. Starting vice versa

Experienced administrators maybe will not get into that trap but maybe developers who create their own local Domino development servers out of the box. In my case I got a pre-installed server that had all the default settings. I instantly create a global internet site setting. For some reason the internet site wasn't detected and used by my server so it fell back to the default value (10000 kB) from the server setting which produced an error like this:

500 INTERNAL ERROR (The server could not fulfill the request because of an unexpected condition)

and in the browser it just said

500 Invalid Post Request

After searching and testing I saved all those documents several times. This seemed to be the reason for me that it finally worked out. During troubleshooting you should shortly switch back to not using internet sites just to get the field visible again in the server document (see 1.) to check the value. I bet the value is too small when you experience problems.
So the bottom line is: do not start with an internet site document before having a look and the server setting when it comes to set the max size of your POST requests, just set the desired value in the POST Data section of the server document first - to a value that will be large enough for you to test and work. After that you can create internet sites as much as you want. The benefit of those are also that you can define rules, but this is another chapter.

p.s.: don't forget to restart the HTTP task whenever you made changes in those settings.

Leave a comment right here