(Update) Increase Alfresco Share 3.4.d 1000 file folder limit

Posted on Sunday, October 21, 2012



This was done with Alfresco 3.4.d  (This issue seems to be fixed in version 4.0+)

Using Alfresco share 3.4.d I recently hit a limit on how many files can be displayed in a folder, it is 1,000.  You can have 10,000 or more files in the folder but only 1,000 will be displayed. 








This is because of a query setting with alfresco and here is how to fix it.  I found this information at http://forums.alfresco.com/en/viewtopic.php?f=4&t=22178 [1]




To show how this is done I am going to create a new site in share and upload 5,000 files to it.

First log into Share




Create a site


Click on Sites ->  Create Site




Name it Lots Of Files.


Then open up the site and click on the Document Library



Click on New Folder






Name it Files and click Submit





Turning on FTP Server


Alfresco 3.4/Tomcat/and Adobe Flash combo have an issue and do not work with multiple upload files via the web interface.  So for testing I am going to turn on the FTP server and use that to upload over 1,000 files for testing purposes.

Edit the Alfresco-global.properties file


        > cd /opt/tomcat/shared/classes
        >     sudo cp alfresco-global.properties.sample alfresco-global.properties


Add the following


ftp.enabled=yes


Reboot the server (or restart alfresco)




For a quick FTP test ftp from the same server that hosts alfresco


        >    ftp localhost

Use your username and password for alfresco when prompted









To get to the Files Directory in the Alfresco site that was just made here is the command within FTP to run


        >    cd Alfresco/Sites/lotsoffiles/documentLibrary/Files

Of course right now it’s empty…

So if the FTP is working now work on creating some files to upload



Making 5000 files


There are many ways to make 5,000 files, here is how I did it in Cygwin

I made this simple script called makeFiles.sh


#!/bin/bash

for((i=0; i < 5000; i++))
do
dd if=/dev/zero of=file_$i.dat bs=1 count=1K
done



And run it


        >    bash makeFiles.sh






FTP back into alfresco but this time use the –i option


        >    ftp -i localhost

Change to the correct directory



        >    cd Alfresco/Sites/lotsoffiles/documentLibrary/Files

Use mput to place all the .dat files into Alfresco



        >    mput *.dat



Logging back into the Alfresco Share site



You can see that although there is 5,000 files in this folder you can only see 1,000 of them.


Fix the 1,000 limit


edit the repository.properties at


        >    sudo vi +125 /opt/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties


update


#
# Properties to limit resources spent on individual searches
#
# The maximum time spent pruning results
system.acl.maxPermissionCheckTimeMillis=10000
# The maximum number of results to perform permission checks against
system.acl.maxPermissionChecks=1000


to


#
# Properties to limit resources spent on individual searches
#
# The maximum time spent pruning results
system.acl.maxPermissionCheckTimeMillis=50000
# The maximum number of results to perform permission checks against
system.acl.maxPermissionChecks=5000


This ups the limit to 5,000 files and the time limit to 50,000 milliseconds


Now reboot the server or restart alfresco




And now we can see up to 5,000 files in a folder





References
[1]  more than 1000 records in webservice search api?
       Visited 1/2011

No comments:

Post a Comment