Re: pagespeed doesn't work with some ServerNames

343 views
Skip to first unread message

Shawn Ligocki

unread,
Apr 18, 2013, 10:40:00 AM4/18/13
to mod-pagesp...@googlegroups.com
Can you send us an example URL? That would help with diagnosis.

The only reason I could imagine that changing ServerName would cause differences is if your subresources (images, js, css) were on a different domain. Then they would only be rewritten when that was the same domain as the HTML (unless you have specific directives).

Also, did you reload a couple times for each site? If a site is low-traffic it may not have had resources rewritten in cache on first view.


On Thu, Apr 18, 2013 at 9:21 AM, Travis Botello <travis...@gmail.com> wrote:
Hello,

I'm facing a very odd issue with mod_pagespeed 1.4.26.2-2759 on CentOS 5.9. I don't really know how to reproduce this or even describe what is happening, but as far as I can see it on some VirtualHosts mod_pagespeed doesn't do what it is supposed to do.

I've been running mod_pagespeed for almost 1.5 years on my webserver without any issues, but today while I was doing some maintenance I saw that one of my websites source code wasn't modified by mod_pagespeed anymore. The header information still included the "X-Mod-Pagespeed" but it seemed like the corefilters were disabled. The same thing is happening to almost 10 other websites while it is working without any problems on 30 other websites on my web server. I tried to identify a certain pattern when it is not working...but no chance. It's like spinning the wheel of fortune. On some VirtualHosts it is working, on others it doesn't do anything.

I also tried to activate some filters that are part of the core filter manually with "ModPagespeedEnableFilters" but I can only activate filters that are not part of the core filter. 

Another very odd thing is that this strange behavior seems to be related to the ServerName of the VirtualHost. When I switch it to another URL, it works...unfortunately I don't know why it is working with some URLs and with others not.

I flushed the cache etc. but this didn't fix it either.

Maybe you guys have some additional input.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Maksim Orlovich

unread,
Apr 18, 2013, 1:03:25 PM4/18/13
to mod-pagesp...@googlegroups.com
Do you have any error/warning/info messages in the logs, for example mentioning style.css or other page resources in the apache logs?




On Thu, Apr 18, 2013 at 12:14 PM, Travis Botello <travis...@gmail.com> wrote:
UPDATE: Here is the exact same VirtualHost but with a ServerAlias to http://t1.anni-r.de/. For whatever reason here everything is working...I'm totally lost.

Am Donnerstag, 18. April 2013 17:33:43 UTC+2 schrieb Travis Botello:
Hey Shawn, thanks for the quick reply.

The subresources are hosted on the same domain as the website. I also did a couple of reloads but the core filters are simply not modifying anything. The odd thing is when switching the domain of website A (working) with website B (not working) then website B works and website a does not.

Example of a not working domain would be http://www.anni-r.de. As you can see the pagespeed header is sent but only the remove_whitespace filter is working. Non of the core filters is active.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Maksim Orlovich

unread,
Apr 18, 2013, 4:05:09 PM4/18/13
to mod-pagesp...@googlegroups.com

On Thu, Apr 18, 2013 at 3:40 PM, Travis Botello <travis...@gmail.com> wrote:
Yep, I can see some error msgs in the error.log, but I don't know if they are related to my issue:

[Thu Apr 18 18:02:36 2013] [warn] [mod_pagespeed  @9847] [0418/180236:WARNING:serf_url_async_fetcher.cc(1115)] Aborting fetch of http://xxx.xxx.xxx.xxx/assets/template/js/jquery.carouFredSel-5.6.4-packed.js
[Thu Apr 18 18:02:38 2013] [error] [mod_pagespeed 1.4.26.2-2759 @9847] ServerContext: 1 leaked_rewrite_drivers on destruction
[Thu Apr 18 20:08:10 2013] [warn] [mod_pagespeed 1.4.26.2-2759 @13357] [0418/200810:WARNING:resource_fetch.cc(193)] Fetch failed for resource url http://www.example.com/images/xsidQR.gif.pagespeed.ic.Ik6SK68R5g.png
[Thu Apr 18 20:08:10 2013] [warn] [mod_pagespeed 1.4.26.2-2759 @13357] Fetch failed for http://www.example.com/images/xsidQR.gif.pagespeed.ic.Ik6SK68R5g.png, status=404

Interestingly the last two error msgs are related to an URL on which the core filters are not working and the output is not modified.

Yeah, those are the interesting ones (the first two have to do with us trying to cleanup as Apache shuts down one of its worker processes); unfortunately they don't really say much as to what might be going wrong.
Would be it be possible to collect some info either at LogLevel info (warning: spammy) or with /mod_pagespeed_message on? Of particular interest would be messages about failed fetches from 224.0.0.1

A bunch of questions: 
1) Is the www.example.com portion of the hostname correct? 
2) Is this a single server, or something more sophisticated?
3) Do you have any FetchOriginDomain directives? 
4) Do you have IP restrictions on Listen directives?

Thanks,
Maks

Joshua Marantz

unread,
Apr 18, 2013, 5:54:12 PM4/18/13
to mod-pagespeed-discuss
Hi,

the [server-ip] that you redacted; can you use that to, from the machine running mod_pagespeed, run:

wget --header Host:SERVER_NAME http://[server_ip]/cache/preview/cc523322a3dbeea9ebc3f2a9c215cc7f.JPG

Or does that fail?


On Thu, Apr 18, 2013 at 5:45 PM, Travis Botello <travis...@gmail.com> wrote:
Here is more output from the error.log. The same as in the output above. The URL is wrong because the server ip is used instead of the ServerName:

[Thu Apr 18 17:22:56 2013] [warn] [mod_pagespeed  @6081] [0418/172256:WARNING:serf_url_async_fetcher.cc(1115)] Aborting fetch of http://[server-ip]/cache/preview/a90175173a00a0b2322f923ed070cb4c.jpg
[Thu Apr 18 17:22:56 2013] [warn] [mod_pagespeed  @6081] [0418/172256:WARNING:serf_url_async_fetcher.cc(1115)] Aborting fetch of http://[server-ip/cache/preview/7d1f1dfcf08083cefb80903236e4f962.JPG
[Thu Apr 18 17:22:56 2013] [warn] [mod_pagespeed  @6081] [0418/172256:WARNING:serf_url_async_fetcher.cc(1115)] Aborting fetch of http:/[server-ip/cache/preview/cc523322a3dbeea9ebc3f2a9c215cc7f.JPG

Am Donnerstag, 18. April 2013 23:38:10 UTC+2 schrieb Travis Botello:
Thanks for clarification. Hopefully the following will help us to narrow it down:

/mod_pagespeed_messages output:

[Thu Apr 18 23:08:51 2013] [Info] [17618] http://www.anni-r.de/js/jcarousellite1.0.1_min.js: Locking (lock c_yU05E20dI7RE2wUm81.lock)
[Thu Apr 18 23:08:51 2013] [Info] [17618] Initiating async fetch for http://[Server-Ip]/js/jcarousellite1.0.1_min.js
[Thu Apr 18 23:08:51 2013] [Info] [17619] Decoding of resource name http://www.anni-r.de/js/jcarousellite1.0.1_min.js failed because  there is no filter with id jcarousellite1.
[Thu Apr 18 23:08:51 2013] [Info] [17618] http://www.anni-r.de/js/jcarousellite1.0.1_min.js: Unlocking lock c_yU05E20dI7RE2wUm81.lock with cached=true, success=true
[Thu Apr 18 23:08:51 2013] [Info] [17618] Fetch complete: http://[Server-Ip]/js/jcarousellite1.0.1_min.js
[Thu Apr 18 23:08:53 2013] [Info] [17621] Decoding of resource name http://www.anni-r.de/js/jcarousellite1.0.1_min.js failed because  there is no filter with id jcarousellite1.

Please let me know if you need more output/specific output. Some of these look very strange. Especially the ones with the "http://[Server-Ip]/js/jcarousellite1.0.1_min.js". These URLs are all wrong...I don't know why it is trying to grab it from there instead of using the real ServerName. I didn't see any messages referring to fetches from 224.0.0.1. Where should I look for these?

Regarding your questions:
1) Is the www.example.com portion of the hostname correct? 
> Yes, the hostname is correct. It's http://www.anni-r.de/images/xsidQR.gif.pagespeed.ic.Ik6SK68R5g.png . However I can't see any pagespeed links on www.anni-r.de

2) Is this a single server, or something more sophisticated?
> Shared hosting with CentOS 5.9 with usual LAMPP configuration

3) Do you have any FetchOriginDomain directives?
> I'm only using  ModPagespeedShardDomain and ModPagespeedLoadFromFile directives in some VirtualHosts. 

4) Do you have IP restrictions on Listen directives?
> No

Joshua Marantz

unread,
Apr 18, 2013, 6:20:39 PM4/18/13
to mod-pagespeed-discuss
What happens if you remove the Host:SERVER_NAME param?

I'm just wondering if we have the loopback fetches set up correctly.  Maybe ModPagespeedMapOriginDomain?

-Josh


On Thu, Apr 18, 2013 at 6:18 PM, Travis Botello <travis...@gmail.com> wrote:
Hey,

it returns "2013-04-19 00:15:29 ERROR 404: Not Found."
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Travis Botello

unread,
Apr 20, 2013, 7:51:31 AM4/20/13
to mod-pagesp...@googlegroups.com
Hey guys, here's a short update of my situation. I was able to solve my issue but the solution is not very satisfying. I just switched to stable release and now everything is working again. I'm almost sure that the reported issue was related to an unidentified bug in mod-pagespeed-beta-1.4.26.2-2759. Comparing the logs and especially the mod_pagespeed_message output before and after I can see some huge differences that might be the reason why it was not working before:

When you take a look at the logs provided in my earlier posts you can see that when a ServerName/Alias was not wor mod_pagespeed tried to fetch something from the servers ip address which resulted in a 404 error.

This is the output from the stable release:

[Sat Apr 20 13:40:33 2013] [Info] [28317] http://www.anni-r.de/js/jcarousellite1.0.1_min.js: Locking (lock /var/cache/mod_pagespeed/c_yU05E20dI7RE2wUm81.lock)
[Sat Apr 20 13:40:33 2013] [Info] [28317] Initiating async fetch for http://127.0.0.1/js/jcarousellite1.0.1_min.js

As you can see here, the fetch is coming from localhost/127.0.0.1 instead of the servers IP address. Hopefully this helps to fix the bug in the current beta release.

Let me know if you need any additional input.

Am Freitag, 19. April 2013 12:44:57 UTC+2 schrieb Travis Botello:
Hey guys, this morning I had another look at the mod_pagespeed_message and if I'm not totally wrong I can identify a certain pattern in the messages that are thrown by ServerNames that are not working and ServerNames that are working:

http://t1.anni-r.de (ServerAlias which is working):

[Fri Apr 19 12:18:28 2013] [Info] [1162] Fetching resource http://t1.anni-r.de/A.style.css.pagespeed.cf.cNongg2haO.css...
[Fri Apr 19 12:18:28 2013] [Info] [1162] Fetch succeeded for http://t1.anni-r.de/A.style.css.pagespeed.cf.cNongg2haO.css, status=304
[Fri Apr 19 12:18:28 2013] [Info] [1160] Fetching resource http://t1.anni-r.de/images/100xNxlogooo.png.pagespeed.ic.bHiJZR8Cin.png...
[Fri Apr 19 12:18:28 2013] [Info] [1160] Fetch succeeded for http://t1.anni-r.de/images/100xNxlogooo.png.pagespeed.ic.bHiJZR8Cin.png, status=304
[Fri Apr 19 12:18:28 2013] [Info] [1164] Fetching resource http://t1.anni-r.de/images/xpage_background.png.pagespeed.ic.WDqUftEOKW.png...
[Fri Apr 19 12:18:28 2013] [Info] [1164] Fetch succeeded for http://t1.anni-r.de/images/xpage_background.png.pagespeed.ic.WDqUftEOKW.png, status=304
[Fri Apr 19 12:18:28 2013] [Info] [1157] Fetching resource http://t1.anni-r.de/images/xyahoo.png.pagespeed.ic.3tqa4htrXc.png...
[Fri Apr 19 12:18:28 2013] [Info] [1157] Fetch succeeded for http://t1.anni-r.de/images/xyahoo.png.pagespeed.ic.3tqa4htrXc.png, status=304
[Fri Apr 19 12:18:28 2013] [Info] [1158] Fetching resource http://t1.anni-r.de/images/xstumbleupon.png.pagespeed.ic.C08t6h2jIs.png...
[Fri Apr 19 12:18:28 2013] [Info] [1158] Fetch succeeded for http://t1.anni-r.de/images/xstumbleupon.png.pagespeed.ic.C08t6h2jIs.png, status=304
[Fri Apr 19 12:18:28 2013] [Info] [1163] Fetching resource http://t1.anni-r.de/images/xfacebook.png.pagespeed.ic.i64dPJiD15.png...
[Fri Apr 19 12:18:28 2013] [Info] [1163] Fetch succeeded for http://t1.anni-r.de/images/xfacebook.png.pagespeed.ic.i64dPJiD15.png, status=304]

http://www.anni-r.de (ServerName which is not working):

[Fri Apr 19 12:32:04 2013] [Info] [1161] http://www.anni-r.de/js/jquery.countdown.js: Unlocking lock l0adgd-jFV6vbuy0kqx2.lock with cached=true, success=true
[Fri Apr 19 12:32:04 2013] [Info] [1161] Fetch complete: http://[server-ip]/js/jquery.countdown.js
[Fri Apr 19 12:32:04 2013] [Info] [1161] http://www.anni-r.de/style.css: Unlocking lock ouHFlu5MHZ7WmYKpziRi.lock with cached=true, success=true
[Fri Apr 19 12:32:04 2013] [Info] [1161] Fetch complete: http://[server-ip]/style.css
[Fri Apr 19 12:32:04 2013] [Info] [1161] http://www.anni-r.de/js/jcarousellite1.0.1_min.js: Unlocking lock c_yU05E20dI7RE2wUm81.lock with cached=true, success=true [Fri Apr 19 12:32:04 2013] [Info] [1161] Fetch complete: http://[server-ip]/js/jcarousellite1.0.1_min.js

When I compare this pattern to other ServerNames which are working/not working it's always the same:
- For ServerNames that are not working pagespeed tries to fetch resources from the server ip adress instead of using the actual ServerName. (http://[server-ip]/js/jcarousellite1.0.1_min.js which always returns error 404) It also outputs "fetch complete"
- For ServerNames that are working it uses the ServerName instead of the ip adress and it outputs "fetch success"

Maybe this is all useless but I thought it might be helpful to find a solution for this problem.
Hey,

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Joshua Marantz

unread,
Apr 20, 2013, 9:37:31 AM4/20/13
to mod-pagespeed-discuss
Thanks for the investigation Travis.  I agree with you -- I believe a specific change we made in 1.4 has made things worse for your site while attempting to making it better for others.  We need to investigate.

The workaround of falling back to Stable is a good one for now.  We'll need to find out what's different about your server and make our solution work for servers set up that way.  This will need to be resolved next week.

Could you describe the mechanism you use to set up VirtualHosts?  E.g. give the syntax of your VirtualHost declarations, ServerName lines, Listen lines, etc?

-Josh


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Travis Botello

unread,
Apr 20, 2013, 9:54:48 AM4/20/13
to mod-pagesp...@googlegroups.com
Hey Josh,

sure, I'll be glad to give you all the information you need for fixing this issue. I'm using different templates for my VirtualHosts configurations depending on the scope of project (mobile, cms, regular etc.). All these different templates are also using different types of pagespeed filters. However when I was facing this issue I broke down my VirtualHost configuration to a minimum, especially for the example provided in my earlier posts (http://t1.anni-r.de and http://www.anni-r.de). Here's what I ended up with. Note that pagespeed is turned off in the pagespeed.conf. Each VirtualHost resides in its own *.conf file. These *.conf files are included via httpd.conf (e.g. include folder/*.conf):

<VirtualHost *:80>
DocumentRoot /var/www/test/others/anni
ServerName www.anni-r.de ### Was not working
ServerAlias t1.anni-r.de ### Was working
ErrorLog logs/anni-website-error_log
CustomLog logs/annir-website-access_log common

ModPagespeed on
</VirtualHost>

I hope this helps. Do you need more detailed information on a particular part of the VirtualHost setup/machanism? Please let me know...

Maksim Orlovich

unread,
Apr 22, 2013, 8:48:27 AM4/22/13
to mod-pagesp...@googlegroups.com
On Sat, Apr 20, 2013 at 9:54 AM, Travis Botello <travis...@gmail.com> wrote:
>
> Hey Josh,
>
> sure, I'll be glad to give you all the information you need for fixing this issue. I'm using different templates for my VirtualHosts configurations depending on the scope of project (mobile, cms, regular etc.). All these different templates are also using different types of pagespeed filters. However when I was facing this issue I broke down my VirtualHost configuration to a minimum, especially for the example provided in my earlier posts (http://t1.anni-r.de and http://www.anni-r.de). Here's what I ended up with. Note that pagespeed is turned off in the pagespeed.conf. Each VirtualHost resides in its own *.conf file. These *.conf files are included via httpd.conf (e.g. include folder/*.conf):

<snip>

>
> I hope this helps. Do you need more detailed information on a particular part of the VirtualHost setup/machanism? Please let me know...

Thanks for your patience, and details. A few more questions, though
(trying to reproduce your setup here works fine..):
1) What Apache version is this with?
2) Do you use UseCanonicalName?
3) What do your Listen directives look like?
4) Any NameVirtualHost directives?
5) What other modules are in use?

Thanks,
Maks

Travis Botello

unread,
Apr 22, 2013, 12:59:22 PM4/22/13
to mod-pagesp...@googlegroups.com
Hey Maks, just sent you an email with the detailed information.
Reply all
Reply to author
Forward
0 new messages