Warn in System check that Piwik is not compatible with Apache modspeed and ngx_pagespeed #5081

Closed
anonymous-piwik-user opened this Issue May 4, 2014 · 8 comments

Projects

None yet

5 participants

@anonymous-piwik-user

Hi, I was told to create a ticket regarding a bug which causes pwiki not to load correctly when mod_pagespeed is enabled on a server. I made a video demonstrating what happens when mod_pagespeed is enabled and disabled: http://screencast.com/t/EIo5VnTX

@mattab
Member
mattab commented May 6, 2014

Thanks for the report. If anyone else experiences this issue please comment!

@mattab
Member
mattab commented May 23, 2014

We got one more report of a user who experiences problems with pagespeed mod.

Maybe we could automatically disable it via htaccess? Or maybe add a System check warning?

@mattab
Member
mattab commented May 23, 2014

From Thomas:

All Websites is not working because of "Pagespeed" which adds the following script tag to an AngularJS template:

<div>that's our template</div>
<script pagespeed_no_defer="">(function(){var e=encodeURIComponent,f=window,h=document,m="width",n="documentElement",p="height",q="length",r="prototype",s="body",t="&"................;pagespeed.criticalImagesBeaconInit('/ngx_pagespeed_beacon','plugins/MultiSites/angularjs/dashboard/dashboard.html?cb=98f8a8ce3d1b407362b58a8fca72911b','_cC5oOyMsy',false,'XTfZDrF1mnM');</script>

I'm kinda sure the Angular template compiler expects to see only one element and not multiple ones. Surprisingly it works for the SiteSelector.html which includes such a script tag as well and I cannot 100% explain why it works there. Saying "It works similarly to a web crawler, by taking a snapshot of your page sans javascript and DECIDES what content to CPOMPRESS for you." here: http://www.reddit.com/r/webdev/comments/1j3lh8/advice_is_it_possible_to_use_google_pagespeed/ So it might compress some templates, some not.

Many reports on the dashboard do randomly not seem to work. Got rarely "502 Bad Gateway" and often "(failed)
net::ERR_INCOMPLETE_CHUNKED_ENCODING". Surprisingly "getNumberOfVisitsPerVisitDuration" seems to often return a "502 Bad Gateway" whereas for example "getDonateForm" and other reports often seem to return "INCOMPLETE_CHUNKED_..... And it fails only every second request or so.

The server is also quite slow in general... Maybe all related to pagespeed?

@patrickhafner

Issue in 2.8.3 when adding new website as well. The Table won't get filled due to angular js errors in the console when mod_pagespeed is active.

@mattab mattab changed the title from Make Piwik usable with Mod_Pagespeed or warn in System check to Warn in System check that Piwik is not compatible with Apache modspeed Oct 28, 2014
@mattab mattab changed the title from Warn in System check that Piwik is not compatible with Apache modspeed to Warn in System check that Piwik is not compatible with Apache modspeed and This is true for ngx_pagespeed Oct 28, 2014
@mattab
Member
mattab commented Oct 28, 2014

On Nginx pagespeed is also causing the trouble: Just wanted to confirm that ngx_pagespeed's Add Head filter is the sole reason that the Websites settings page wasn't listing any sites., reported in this forum post

@tohn
tohn commented Nov 27, 2014

We can confirm this issue. After we disabled mod_pagespeed, it worked fine again.

@mattab mattab modified the milestone: Piwik 2.10.0 , Short term Nov 28, 2014
@mattab mattab self-assigned this Nov 28, 2014
@mattab
Member
mattab commented Nov 28, 2014

Here they discuss how to detect modpagespeed is running: websharks/comet-cache#234

@mattab mattab closed this in d89ba25 Nov 28, 2014
@mattab mattab changed the title from Warn in System check that Piwik is not compatible with Apache modspeed and This is true for ngx_pagespeed to Warn in System check that Piwik is not compatible with Apache modspeed and ngx_pagespeed Dec 18, 2014
@PazkaL
PazkaL commented May 19, 2015

I've had the same error "net::ERR_INCOMPLETE_CHUNKED_ENCODING" when serving piwik from an nginx server.
after adding "sendfile off;" to the server { .. } block of the configuration the issues where resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment