Pengus Posted November 5, 2012 Share Posted November 5, 2012 (edited) 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 November 5, 2012 by Pengus (see edit history) 1 Link to comment Share on other sites More sharing options...
guest* Posted November 5, 2012 Share Posted November 5, 2012 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 More sharing options...
guest* Posted November 5, 2012 Share Posted November 5, 2012 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 More sharing options...
Pengus Posted November 5, 2012 Author Share Posted November 5, 2012 (edited) 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 November 5, 2012 by Pengus (see edit history) Link to comment Share on other sites More sharing options...
Pengus Posted November 5, 2012 Author Share Posted November 5, 2012 (edited) and oh no... the 502 error is on the login page for the customers in front office.. edit: Also get the error when browsing customer list.. im sure there is more. Oh yes indeed, in the last steps of checking out. Edited November 5, 2012 by Pengus (see edit history) Link to comment Share on other sites More sharing options...
guest* Posted November 5, 2012 Share Posted November 5, 2012 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 More sharing options...
Pengus Posted November 5, 2012 Author Share Posted November 5, 2012 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 More sharing options...
landychu Posted April 13, 2013 Share Posted April 13, 2013 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 More sharing options...
vargaz Posted October 28, 2014 Share Posted October 28, 2014 any solutions yet? i have 1.4.4.0 and just some days from yet the problem popped up.. 502 bad gateway nginx Link to comment Share on other sites More sharing options...
telewebshop Posted April 8, 2015 Share Posted April 8, 2015 hello im dealing with the same problem! but i cant login to my backoffice so i cant change the cookie session time. how is it possible to change if you cant get in to your backoffice? Link to comment Share on other sites More sharing options...
jacograaff Posted April 9, 2015 Share Posted April 9, 2015 this fixed it for me: nginx, fpm, prestashop 1.6 http://www.nginxtips.com/php5-fpm-sock-failed-13-permission-denied-error/ It was #4 at: http://www.nginxtips.com/502-bad-gateway-using-nginx/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now