Jump to content

502 Bad Gateway - How to remove cookie encryption!?


Recommended Posts

502 Bad Gateway

nginx/1.2.1

 

I am kinda panicing right now because I have a lot of customers to take care of!

Im not advanced at all in web development so I need your help here. From googling around for a while it´s come to my understanding that this problem appears because of the big amount of cookies prestashop is sending out. I have contacted my host and they can not change the limit. He showed me the error:

[sun Nov 04 07:37:34 2012] [error] mod_hostinglimits:Error on LVE enter: LVE(2451) HANDLER(fcgid-script) HOSTNAME(swebuzz.org) URL(/index.php) TID(256966) errno (7) Read more:http://e.cloudlinux.com/MHL-E2BIG

 

So there is no known fix for this prestashop error and the host can not help me, so I came up with this idea:

The prestashop cookies is encrypted, and this must make the cookies so much bigger.. right?

So my thought is ...How much security would I lose from removing the cookie encryption? And if the security loss is acceptable: What code in what file should I edit to remove the cookie encryption?

 

It´s monday and a week full of sales is waiting as long as you guys can help me out. So thanks in advance for quick answers

Edited by Pengus (see edit history)
  • Like 1
Link to comment
Share on other sites

I don't think you problem is the cookie encryption, but rather the too long cookie-session time set on BO. I solved all my 502 bad request problems by reducing the Cookie lifetime for back-office and front-office by setting them lower. By default Prestas assumes 480, with 240 I have no more 502 Bad request errors. Try it by this way. You will find the feature under the preference settings

Link to comment
Share on other sites

I forgot: after changing the setting, you need to clear all your browser sessions and cookie sessions and login again. This should solve for ever your 502 bad request problem. And when it appears again, you only need to clear your cookie sessions in the borowser. The 502 Problem is a client HTTP-request problem and it ist caused by the server not understanding what the browser ist sending and vice versa.

Link to comment
Share on other sites

Thank you cd2500 my angel, it worked! =*

and I started to change the code in settings.inc.php, removing the SALT phrase and disabled stuff in the cookie.php file, lol.. then it was so simple

 

 

EDIT: NOT WORKING 100%! When I got to "next page" in the order list the same 502 bad gateway error appears, and also if i try a higher "view per page" amount. I tried setting the cookie lifetime to really low values but it doesnt help.

Edited by Pengus (see edit history)
Link to comment
Share on other sites

Did you changed both cookie-session times ? Front-office AND back-office ? You should change boths to a lower time.

Which PS-version, which browser ? Did you undone your changes in the files ?

 

Server configuration ? Balance load limit ?

 

The problem is indeed a client problem so on your browser or on your IP. It's a HTTP non understanding protocol problem. It could be a problem on the server of your internet connection or your browser sending wrong headers.. Did you tried with another browser ? Changing your IP ?

Link to comment
Share on other sites

Yes changed both front and backoffice to the same amount. PS version is 1.5.0. I use google chrome. I never even saved the changes in the files.

What do you want to know regarding the server configuration? The only response i got from the support was that im exceeding their resource limit and therefore my script was aborted. They can not lift this limit. I have a managing partner that also gets the same error on his computer. We tried different browsers

Link to comment
Share on other sites

  • 5 months later...

I don't think you problem is the cookie encryption, but rather the too long cookie-session time set on BO. I solved all my 502 bad request problems by reducing the Cookie lifetime for back-office and front-office by setting them lower. By default Prestas assumes 480, with 240 I have no more 502 Bad request errors. Try it by this way. You will find the feature under the preference settings

 

Hi cd2500,

 

I have this problem, but my PS version is 1.3.1. I use Firefox, how I should do to solve this problem? Please help me. Thanks.

Link to comment
Share on other sites

  • 1 year later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...