Re: [Opensymphony-oscache] Unable to write | File Name too long
Lars Torunski <[email protected]> Sat, 16 Jan 2010 11:50:42 +0100
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <[email protected]> |
Hi Dipti, the message "File name too long" isn't a message by OSCache, hence your keys are really too long. Since the filename is created based on the key and you can't shorten your keys at all, you have to use the HashDiskPersistenceListener if you can use hashed keys. If you really need unique filenames, you have to adapt the DiskPersistenceListener to create sub directories on every 8th key character for example. Regards, Lars On 13.01.2010 12:01, Dipti Khullar <[email protected]> wrote: > Hi > We are using OSCache in our application as an extra layer for caching > homepages since about 1 month and we haven't faced any issues in the same. > But recently we have observed following exceptions related to OSCache: > [2010-01-13 > 01:09:43.433][com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache][ERROR] > [oscache] Exception persisting > RBES:1237401459377:RB_Event:RB_Video:RB_Gallery:RB_Profile:RB_Table:RB_Download:RB_Game:rbsubsection:Motor > Sports 4 Wheel2010-01-13T23:59:00Z:2010-01-13T00:00:00Z:10:0:date:desc > com.opensymphony.oscache.base.persistence.CachePersistenceException: > Unable to write > '/opt/fatwire/oscache/application/RBES_91237401459377_23RB_26Event_32RB_35Video_41RB_44Gallery_52RB_55Profile_63RB_66Table_72RB_75Download_84RB_87Game_92rbsubsection_105Motor_111Sports_1184_120Wheel2010-01-13T23_13959_14200Z_1462010-01-13T00_16000_16300Z_16710_1700_172date_177desc.cache' > in the cache. Exception: java.io.FileNotFoundException, Message: > /opt/fatwire/oscache/application/RedBullES_91237401459377_23RB_26Event_32RB_35Video_41RB_44Gallery_52RB_55Profile_63RB_66Table_72RB_75Download_84RB_87Game_92rbsubsection_105Motor_111Sports_1184_120Wheel2010-01-13T23_13959_14200Z_1462010-01-13T00_16000_16300Z_16710_1700_172date_177desc.cache > (File name too long) > As it clearly says, that file name is too long. But we cannot change > the keys as they are all created dynamically and are necessary for the > page to get rendered. > I couldn’t find any limits on number of characters for the filename > being generated in documentation or on WIKI. > Can somebody let us know the maximum limit for these filenames or if > somehow we can increase the same to get rid of these exceptions? > Configurations: > Application Server: Tomcat 6 > Platform: Red Hat Enterprise Linux > Version: oscache-2.4.1 > Java: JDK 1.5 > oscache.properties: > #cache.memory=true > cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener > cache.path=/opt/fatwire/oscache/ > Thanks > Dipti