Edit report at http://bugs.php.net/bug.php?id=52312&edit=1
ID: 52312 Updated by: paj...@php.net Reported by: v dot damore at gmail dot com Summary: PHP lstat problem Status: Bogus Type: Bug Package: Safe Mode/open_basedir Operating System: Linux PHP Version: 5.2.13 New Comment: The scan of each element of the paths happen anyway, whether the paths contain symlinks or not. Check the code TSRM/ for a deeper explanation. Previous Comments: ------------------------------------------------------------------------ [2010-07-12 15:57:54] v dot damore at gmail dot com @pajoye; as is described in "Actual result" part of this bug, first time PHP engine check filepath there is a full scan of all directories at least 4 times before cache the result, this behavior anyway cannot scale in a so large environment. @rasmus: this is very interesting, I can consider upgrade to 5.3 in order to avoid this behavior. I know this is an extrema ratio: may I disable symlinks support from PHP engine in order to avoid this behavior? Is there an answer regarding the increase of realpath_cache_size realpath_cache_ttl? ------------------------------------------------------------------------ [2010-07-12 15:36:10] ras...@php.net And like I said, we have made this more efficient in PHP 5.3 because we now cache the partial paths separately. You should see a performance improvement going to 5.3. ------------------------------------------------------------------------ [2010-07-12 15:32:33] paj...@php.net Again, it does it once and only once per path. When it does it, it checks each element of a path (and cache each of them too). ------------------------------------------------------------------------ [2010-07-12 14:59:36] v dot damore at gmail dot com I must also to notify that looking at our production servers in some cases PHP engine tries up to 8 times before read the file. Can you explain why PHP engine have this behavior? There is any way to remove/change this behavior in PHP engine? ------------------------------------------------------------------------ [2010-07-12 14:43:43] v dot damore at gmail dot com We already tuned cache size to following values: realpath_cache_size=1024k realpath_cache_ttl=7200 Can we increase cache size to: realpath_cache_size=40960k realpath_cache_ttl=72000 Do you know if memory_limit is affected by realpath_cache_size increase? Actually our memory limit is set to: memory_limit = 96M But biggest problem we have at moment is when search engines spiders come to crawling all platform. In this case all existing pages are crawled by spiders. Can you suggest us a workaround? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=52312 -- Edit this bug report at http://bugs.php.net/bug.php?id=52312&edit=1