Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

rfc - generated cache names are too long #9

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 11 comments
Closed

rfc - generated cache names are too long #9

GoogleCodeExporter opened this issue Apr 6, 2015 · 11 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. create a whole lot of css files
2. include them in a page
3. refresh so that the cache is generated

What is the expected output? What do you see instead?
a file name that the server can render. something like a hash and link the hash 
internally to that long string possibly 

error log:
[Thu Nov 04 01:29:33 2010] [error] [client 127.0.0.1] (36)File name too long: 
access to 
/cc.8d06446468a1b74b8b379d1462beb5a8.assets,_css,_960gs,_960,s+assets,_css,_admi
n_nav,s+assets,_css,_960gs,_uncompressed,_demo,s+assets,_css,_jquery_ui,s+projec
ts,_css,_projects,s+gallery,_css,_gallery,s+gallery,_css,_style_1,s+thickbox,_cs
s,_thickbox,s+contact,_css,_contact,s+comments,_css,_comment,s+filter,_css,_filt
er,s+tags,_css,_tags,s+debug_kit,_css,_debug_toolbar,s.css failed, referer: 
http://dogmatic69.dev/admin

What version of the product are you using? On what operating system?
mod_pagespeed 64-bit .deb ubuntu 10.10 x64 + 5.3.3-1ubuntu9.1 + Apache/2.2.16 
(Ubuntu)

Please provide any additional information below.
long file names generate a 403 Forbidden for anyone else that gets this

Original issue reported on code.google.com by dogmatic69 on 4 Nov 2010 at 2:02

@GoogleCodeExporter
Copy link
Author

Thanks for the report.  As a workaround, you can disable 'combine_css' with:

kModPagespeedDisableFilters combine_css

in pagespeed.conf.  But I am curious what software is complaining about this 
particular case.   The URL in the issue report is about 423 characters long.  
This is too long for a single-leaf filename, but mod_pagespeed does not need to 
use the URL as a filename.

Does anyone know what module would be printing this format of error message?

[Thu Nov 04 01:29:33 2010] [error] [client 127.0.0.1] (36)File name too long: 
access to ....

I just tried to search for "File name too long: access to " and I saw this 
error reported multiple times over the last few years, including:

https://issues.apache.org/bugzilla/show_bug.cgi?id=49131

I wonder if there's a simple patch to a mod_*.c file somewhere that could bump 
up a buffer size  to a higher limit. 

Original comment by jmara...@google.com on 4 Nov 2010 at 3:11

@GoogleCodeExporter
Copy link
Author

here are all the modules that are enabled on my install

[public_html dev ↑⚡] $ apache2 -l
Compiled in modules:
  core.c
  mod_log_config.c
  mod_logio.c
  prefork.c
  http_core.c
  mod_so.c
[public_html dev ↑⚡] $ ls /etc/apache2/mods-enabled/
alias.conf            autoindex.load  negotiation.conf  reqtimeout.load
alias.load            cgi.load        negotiation.load  rewrite.load
auth_basic.load       deflate.conf    pagespeed.conf    setenvif.conf
authn_file.load       deflate.load    pagespeed.load    setenvif.load
authz_default.load    dir.conf        php5.conf         status.conf
authz_groupfile.load  dir.load        php5.load         status.load
authz_host.load       env.load        proxy.conf
authz_user.load       mime.conf       proxy.load
autoindex.conf        mime.load       reqtimeout.conf

Its pretty much the default php5 install from apt-get install php5, i found 
some sites last night with this error being reported to apache 
https://issues.apache.org/bugzilla/show_bug.cgi?id=45187


Original comment by dogmatic69 on 4 Nov 2010 at 8:44

@GoogleCodeExporter
Copy link
Author

Same error here.

*What version of the product are you using? On what operating system?*
mod_pagespeed 32-bit .deb, Ubuntu/10.04 x32 + PHP/5.3.2-1ubuntu4.5 + 
Apache/2.2.14-5ubuntu8.3

Original comment by zee...@gmail.com on 4 Nov 2010 at 11:56

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 5 Nov 2010 at 10:54

@GoogleCodeExporter
Copy link
Author

I'm also experiencing this issue. Long URLs generated by the combine CSS filter 
are returning 403 forbidden

Original comment by daniel.b...@gmail.com on 5 Nov 2010 at 11:20

@GoogleCodeExporter
Copy link
Author

I found the source of the problem in the httpd source.

I believe httpd is applying posix pathname limitations to URLs.  This is 
unfortunate as URLs can be much longer; there's no need for them to be limited 
by the file system.

But the only filter that's likely to be affected is combine_css and we'll put a 
ceiling on the pathnames that it generates to avoid this problem.

Original comment by jmara...@google.com on 5 Nov 2010 at 11:33

@GoogleCodeExporter
Copy link
Author

the reason it does that is because it first looks to see if there is a file of 
that name for some reason. This has been filed as a bug many times at apache 
and they will not fix it (going back 3 years or so) 


Original comment by dogmatic69 on 6 Nov 2010 at 1:39

@GoogleCodeExporter
Copy link
Author

Original comment by jmara...@google.com on 8 Nov 2010 at 2:58

  • Changed title: rfc - generated cache names are too long

@GoogleCodeExporter
Copy link
Author

This has been fixed in the trunk, but the fix is not available in a binary 
release yet.

SVN trunk revision 180 has this change:  

http://code.google.com/p/modpagespeed/source/detail?r=180

Original comment by jmara...@google.com on 11 Nov 2010 at 6:32

  • Changed state: Fixed

@oTnarP
Copy link

oTnarP commented Jul 14, 2015

Anyone used "Long Path Tool" for this error?

@jmarantz
Copy link
Contributor

Note that this bug was fixed well over 4 years ago. Sabbir786: what are you seeing exactly?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants