flash_peter Posted May 13, 2014 Share Posted May 13, 2014 Hi everyone.our shop is waiting for one shipping module... and when it's released we hit very nasty problem. http error 502, lookin into logs we discovered, that this is header size overload.ive spent few hour of [censored] debuging, and ive found that root of that problems, is set_cookie, that setting almost same cookie 200 times... and giving 250KB of cookies in HEADER (~200x1.5kb)because, that shipping module using cookies as global storage. and doing:$cookie->order_id=22;so FYI guys, each time, when you put something into cookie, object is trigger __set method, wich finaly put WHOLE encoded cookie string into output stream. Be aware of that!!!searching throught google, ive discovered many issues about 502, and standart answer of support:-prestashop cookie size never exceed 4kb, so look into your modules...ok...finaly we decide write own session class, that will replace transparently prestashop cookie.im attaching file and SQL in it, so you can use it and save your timejust execute SQL, and put Cookie.php into /claases/overrideenjoy, (tested on 1.4.5.1) Cookie.php Link to comment Share on other sites More sharing options...
Recommended Posts