httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo D'Amore" <v.dam...@gmail.com>
Subject Re: [users@httpd] Re: Apache lstat performance problem
Date Fri, 09 Jul 2010 16:33:47 GMT
Thanks to who answered me,

the problem was definitely related to PHP, I still don't understand why PHP
tries so much times to read a file but this behavior appears
when PHP_ADMIN_VALUE open_basedir is defined inside <Directory /...>
Removing such PHP_ADMIN_VALUE open_basedir setting, now I have only one:

lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local/myspaces", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/local/myspaces/myspaces08", {st_mode=S_IFDIR|0777, st_size=1024,
...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP", {st_mode=S_IFDIR|0755,
st_size=13312, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa", {st_mode=S_IFDIR|0755,
st_size=80, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al", {st_mode=S_IFDIR|0755,
st_size=80, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall",
{st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace",
{st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps",
{st_mode=S_IFDIR|0750, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451",
{st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs",
{st_mode=S_IFDIR|0755, st_size=2048, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content",
{st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages",
{st_mode=S_IFDIR|0777, st_size=1024, ...}) = 0
lstat("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
{st_mode=S_IFREG|0777, st_size=1312, ...}) = 0

And immediately after the file is read:

open("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
O_RDONLY) = 416
fstat(416, {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
open("/usr/local/myspaces/myspaces08/NSP/wa/al/wall/webspace/siteapps/21451/htdocs/wp-content/languages/zh_CN.php",
O_RDONLY) = 417
fstat(417, {st_mode=S_IFREG|0777, st_size=1312, ...}) = 0
mmap(NULL, 1312, PROT_READ, MAP_SHARED, 417, 0) = 0x2b4a96443000
munmap(0x2b4a96443000, 1312)            = 0
close(417)                              = 0
read(416, "<?php\r\n// Make the admin interfa"..., 8192) = 1312
read(416, "", 8192)                     = 0
read(416, "", 8192)                     = 0
close(416)                              = 0


Regards,
Vincenzo



On Fri, Jul 9, 2010 at 11:40 AM, Vincenzo D'Amore <v.damore@gmail.com>wrote:

> Hi Joost,
>
> I suppose this is not the case, because I already see in strace output the
> part related to "AllowOverride set":
>
> lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> lstat("/usr/local/mywebspace", {st_mode=S_IFDIR|0755, st_size=4096, ...}) =
> 0
> open("/usr/local/mywebspace/.htaccess", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> lstat("/usr/local/mywebspace/mywebspace01", {st_mode=S_IFDIR|0755,
> st_size=1024, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/.htaccess", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> lstat("/usr/local/mywebspace/mywebspace01/NSP_COL", {st_mode=S_IFDIR|0755,
> st_size=2048, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/NSP_COL/.htaccess", O_RDONLY) = -1
> ENOENT (No such file or directory)
> lstat("/usr/local/mywebspace/mywebspace01/NSP_COL/da",
> {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/NSP_COL/da/.htaccess", O_RDONLY) =
> -1 ENOENT (No such file or directory)
> lstat("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am",
> {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am/.htaccess",
> O_RDONLY) = -1 ENOENT (No such file or directory)
> lstat("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am/damorealt",
> {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am/damorealt/.htaccess",
> O_RDONLY) = -1 ENOENT (No such file or directory)
> lstat("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am/damorealt/webspace",
> {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
> open("/usr/local/mywebspace/mywebspace01/NSP_COL/da/am/damorealt/webspace/.htaccess",
> O_RDONLY) = 23
>
> I suppose this is the parte where Apache httpd check the existence of
> .htaccess
>
>
> On Fri, Jul 9, 2010 at 10:43 AM, Joost Heer, de <j.d.heer@atriummc.nl>wrote:
>
>> >For every file should be served by apache httpd, apache httpd tries to
>> lstat
>> >all directory in path more times:
>>
>> This is normally seen when you have .htaccess usage turned on (all
>> subdirectories have to be checked for the presence of .htaccess). Do you
>> have AllowOverride set to off?
>>
>> Joost
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> Vincenzo D'Amore
> email: v.damore@gmail.com
> msn: freedev@hotmail.com
> skype: free.dev
> mobile: +39 349 8513251
>



-- 
Vincenzo D'Amore
email: v.damore@gmail.com
msn: freedev@hotmail.com
skype: free.dev
mobile: +39 349 8513251

Mime
View raw message