madalinoprea / magneto-varnish

Magento extension that implements full page caching using Varnish
http://moprea.ro/2011/may/6/magento-performance-optimization-varnish-cache-3/
123 stars 36 forks source link

Admin Panel Customer CSV shows 503 Guru Meditation #13

Closed ittec closed 13 years ago

ittec commented 13 years ago

Hello

firstable, congratulations by your module. I will write a post about it. But now I have a little issue here. Is not a big deal, but the people who runs magento admin panel need this to be running. The point is customer page and make a EXPORT CSV. With Apache we are able to download csv file but when we activate Varnish, it returns us a 503 Guru Meditation. I have done some test with VLC file without success.

Can you give us some help?

Url admin of this panel is:

if (req.url ~ "^/(index.php/)?pc_deporv") { return(pass); }

And URL of customer CSV export is:

pc_deporv/customer/exportCsv/

Thanks!

madalinoprea commented 13 years ago

Hi Ittec,

The most plausible cause for this issue is a timeout (I assume the exports takes some time). Please check http://vincentfretin.ecreall.com/articles/varnish-guru-meditation-on-timeout and update backend definition in vcl file with something like this: backend default { .host = "127.0.0.1"; .port = "81"; # READ THIS: You should configure Apache to run on port 81 .first_byte_timeout = 300s; # 5 minutes }

The right way to do this is to define a new backend and set it when url matches pc_deporv: backend admin { .host = "127.0.0.1"; .port = "81"; .first_byte_timeout = 300s; # 5 minutes } ...

In vcl recv:

if (req.url ~ "^/(index.php/)?pc_deporv") { set req.backend = admin; # Different timeout return(pass); }

Hope this will solve your issue. Cheers, Mario

madalinoprea commented 13 years ago

Old issue, no feedback and not really related to a Magento extension.