My environment is a shared hosting package by 1und1 (1and1). Locally on my laptop, everything works fine.
I'm sending quite a large AJAX request to the server (~1.2MB) which worked fine for a long time now. However, a few days ago it stopped working and I keep getting the following response:
413 Request Entity Too Large
The requested resource [my request URL] does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
When I lower the size of the POST parameter (a long JSON-string), then everything works as expected. The limit is somewhere around 1MB (determined by trial and error).
I've found a lot of suggestions what the cause could be. E.g. the following php config values. However, they are more liberal than the ones on my local machine and I cannot see where they could be a limit here:
- max_input_time = -1
- max_execution_time = 50000
- upload_max_filesize = 64M
- post_max_size = 64M
- memory_limit = 256M
Then, another config value often appears in solutions, the apache config LimitRequestBody
. The problem here is: AFAIK I don't have acccess to changing it on the 1and1 shared hosting - and I cannot find a way to view the apache error log...
I initially thought that the LimitRequestBody
must be the cause.
But why can I upload files via a normal POST HTML file
form then (tested with a 4MB file) on the same server (using the Symfony 2 form builder with a filetype object which seems to translate into a standard HTML file upload form)? As far was I understand the LimitRequestBody
(and if applicable also SecRequestBodyNoFilesLimit
) value, it should also cause the same error here, if it really was the cause, right?
So does anyone has another idea what I could do to debug this error any further? Or has a solution to my question above? Or at least any ideas how to workaround this?
PS:
SSLRenegBufferSize
should not be relevant when accessing the webpage without https, right?