Support

Akeeba Backup for Joomla!

#30076 Size of a request header field exceeds server limit

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Wednesday, 22 August 2018 07:46 CDT

joomleb
Hi guys,
during a backup restoration, clicking on "Run the site restoration script" I have back:

Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.

...and then the site "crashed", I mean I cannot finalize the restoration and I cannot reach the site anymore...

I look for that into documentation without succes.
Please, What can I do to solve the issue ?

nicholas
Akeeba Staff
Manager
Have you tried accessing the installation/index.php URL on your server manually through your browser?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Hi Nicholas,
I'm quite sure "Yes", beacause it was wrote in the info at the top of the Akeeba Backup restoring page. So, I tested it.
The result was the same: after showing me a not found page into the browser for one second, the page redirect me to that message page with URL:
https://mySite.com/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/index.php

Am I missing anything ?

nicholas
Akeeba Staff
Manager
That's very strange because at this point we only do two AJAX requests. Each AJAX request sends three POST fields with a maximum length of 13 characters, for a total POST size under 60 bytes. Your server complains that either the entire POST message or one of the POST fields is too long. Which is rather improbable.

Cookies are also sent, but the only cookie actually used by ANGIE (our restoration script which is what is running once you click Run the Installer) is a session ID that's 32 bytes long. Again, this is too small to reasonably trigger this kind of server error.

I would take that issue to the hosting company to check what is actually being sent to the server and troubleshoot the reason the server responds with this error. I suspect that either a browser extension does something weird or a previously stored cookie on that domain is being sent, either being too long for the server to handle.

I am actually baffled, however, at why Kickstart (the archive extraction script) works in your case since it does send a POST field several kilobytes long to the server. The only way Kickstart would work but ANGIE wouldn't would be a really long cookie, possibly following the corruption of your browser's internal cookie storage.

In any case, can you try using a different browser before asking your host? If a different browser works the problem is definitely some kind of cookie issue with your main browser.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Okay,
I tested it on a Firefox new installation and restoration run.
So, I went back to Chrome and deleted all Cookies, files, images and restoration run.

But, I noted:
1 - When the Restoration begin I have to click on "Run the site restoration script" or I can accidentally click on "Control Panel" - image 1
2 - If I click on "Run the site restoration script" a new browser window is opened and when the restoration has finished I have to close that window and delete the installation files in the old window - image 2
3 - If I accidentally click on "Control Panel" the restoration start on the same browser window and at the end of the process I have the "Remove the installation directory" green button on the bottom - image 3
Would be better to have the same behaviour, pages, buttons, process on both cases
4 - When the "Remove the installation directory" green button has clicked an alert window pop-up appear - image 4
The URL https://www.akeebabackup.com/documentation/troubleshooter/prbasicts.html into that pop-up bring to an 404 Error page

nicholas
Akeeba Staff
Manager
0. OK, the problem was indeed some stale cookie. I'm glad we solved this :)

1. Joomla! does not have a reliable way to make toolbars button disappear after you start the extraction. However, it's inconsequential. Extracting a backup archive creates the “installation” folder which contains the restoration script. When Joomla! detects that this folder exists it will redirect any access attempt to the frontend or backend of the site to the “installation” folder. So no matter what you do you will still get to the installation script. It's just more user friendly having a button that says “Run the installer” instead of having people wonder what to do next :)

2. Yup. That's the normal way to do things.

3. You CAN NOT have the same behavior. See #1.

4. Thanks for the heads up. I'll create a redirect to the correct URL.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

joomleb
Hi Nicholas,
sorry for my English, maybe a missunderstanding here, so, please, read carefully and forgive me:

1 - When the Restoration begin I have to click on "Run the site restoration script" or I can accidentally click on "Control Panel" (a mistake, it happened to me hahaha ) - image 1

2 - Clicking "Run the site restoration script", the normal way, we are agree, a new browser window is opened and when the restoration has finished I have to close that window and delete the installation files in the old window - image 2

3 - If I accidentally click, a mistake, on "Control Panel" (this should be valid for any button) the restoration start on the same browser window and at the end of the process I have the "Remove the installation directory" green button on the bottom - image 3


A - Now, my first suggestion was/is to have the same behaviour, pages, buttons, process on both cases (2 and 3), I mean: b]the restoration start on the same browser window[/b] or the restoration start opening a new browser window.


B - I think we are agree that a "binary" (software) process have to be always most safer as possible, something like stupid-proof (in this case I'm been the stupid).
So, following the normal way (case 2) a new browser window is opened and it mean that during the Restoration process I can always click and surf on the first joomla broswer window tab and click on "Finalise the Restoration" (that should "Remove the installation Directory").
I made some tests creating this unlikely, but possible, situation: clicking on "Finalise the Restoration" in the first window browser tab during the "Database Restoration" in the second window browser tab. The result:

The first browser window tab, the Joomla one, always logout me from the administrator backend, but logically only a part of the Database has been yet overwritten = not all DB datas are Restored.
On one test Admin Tools loose all its configurations like if it was a new installation.

While the "Database Restoration" second browser windowtab simply show the error messsage:
HTTP Request Error
HTTP Status: 500 (Internal Server Error)
Internal status: error
XHR ReadyState: 4
Raw server response:

My second suggestion would be to start the restoration on the same browser window also for the case 2, the normal way, like it happen yet in the case 3.

nicholas
Akeeba Staff
Manager
As I already explained and very clearly stated, this is NOT POSSIBLE because of the way Joomla! works.

The Control Panel button is part of the Joomla! toolbar. We only have a very narrow control of the button, namely putting it there and telling it which URL to use. This button must be there if you decide you want to abort the restoration before extracting the backup archive. Unfortunately, the Joomla! API does NOT let us remove it (via JavaScript) when the restoration begins. Even though you might very naively think that we can target the HTML document element and hide it this is not really possible because of a. the differences between Joomla! versions (3.4 and 3.8 use much different HTML for the button) and b. the fact that you might be using a different backend template with a different DOM structure. Therefore using JS to remove the element is not guaranteed to work and failure to work would mean that the restoration does not proceed.

The Run The Installer button does something entirely different. It opens a new browser window/tab with a special name. This name is detected at the end of the restoration process by ANGIE. In this case, ANGIE hides its own Clean Up button and tells you to go back and click the Clean Up button.

From a functional perspective, both ANGIE's built in cleanup and the Clean Up in the integrated restoration page (or Kickstart) do the same thing. However, as I very patiently explained once more HAVING BOTH THE CONTROL BUTTON AND THE RUN THE INSTALLER BUTTON BEHAVE THE SAME WAY IS NOT AT ALL POSSIBLE FOR REASONS WHICH ARE NOT UNDER OUR CONTROL. Removing the Control Panel button completely is also not an option because users do not understand how to cancel the restoration (true story; that's why the button was added there).

Finally note that there is nothing "binary" in PHP. PHP is an interpreted language.

In any case what you are asking is not really a problem and causes no issues whatsoever. I am closing this ticket because it's a trivial non-issue which cannot be addressed (we DO NOT control Joomla's source code or have any input on its direction).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!