Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

403 for long URLs

ManuMathew1994
Level 3
Level 3

Getting 403 Forbidden for URL-- .../compare.compareonload._content_xxxxxcl_en_personal-banking_cards_credit-cards_123-dream-different-credit-card._content_xxxxxcl_en_personal-banking_cards_credit-cards_fortune-gold-card._content_xxxxxcl_en_personal-banking_cards_credit-cards_feast-gold-card.json

 

error on dispatcher error logs-as "File name too long".

How can we handle this issue.

 

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

The problem is the length of a filename in the dispatcher cache. Ext4 as the most common filesystem on linux imposes a limit of 255 characters on the filesystem. That means that trying to cache such files will cause a problem already (and thus cause the problem you are facing).

 

You seem to use multiple parameters as suffix, what if you separate them by a "/" (slash), so from an URL perspective it looks like a hierarchy, and you can avoid long file names.

View solution in original post

5 Replies
ManuMathew1994
Level 3
Level 3

This issue seems to be from the dispatcher, in publish instance there is no such issue . Seems there is some configuration to be done in dispatcher level.

Tried few suggestions but no luck:

Jörg_Hoh
Correct answer by
Employee
Employee

The problem is the length of a filename in the dispatcher cache. Ext4 as the most common filesystem on linux imposes a limit of 255 characters on the filesystem. That means that trying to cache such files will cause a problem already (and thus cause the problem you are facing).

 

You seem to use multiple parameters as suffix, what if you separate them by a "/" (slash), so from an URL perspective it looks like a hierarchy, and you can avoid long file names.

View solution in original post

ManuMathew1994
Level 3
Level 3

Hi 

Yes you are correct , 

so here the functionality is to compare 3 products configured in diff pages-

1. _content_xxxxxcl_en_personal-banking_cards_credit-cards_123-dream-different-credit-card.

2. _content_xxxxxcl_en_personal-banking_cards_credit-cards_fortune-gold-card.

3. _content_xxxxxcl_en_personal-banking_cards_credit-cards_feast-gold-card

 

Did you mean, to separate them by a "/" (slash) and revert it back to the accepted format _ from the dispatcher using rewrite rules?

Do you have any idea to change limit via any dispatcher level configuration, is this possible?

 

Jörg_Hoh
Employee
Employee

I could envision this URL to work 

.../compare.html/_content_xxxxxcl_en_personal-banking_cards_credit-cards_123-dream-different-credit-card/_content_xxxxxcl_en_personal-banking_cards_credit-cards_fortune-gold-card/_content_xxxxxcl_en_personal-banking_cards_credit-cards_feast-gold-card.html

 

This is a cacheable URL and on AEM side you can easily extract the suffix from the URL, and then split the suffix into the different parameters.

 

The limit cannot be changed, this is a hard limit imposed by the operating system.