Drupal 6.3 постоянный timeout [SOLVED]

Главные вкладки

Аватар пользователя tradakad tradakad 30 июля 2008 в 13:25

Всем привет!

не могу разобраться в чем проблема. Drupal 6.3 жутко медленно работает СРАЗУ после установки.

несколько раз пробовал переустанавливать - проблема не исчезает, и довольно постоянна.

сразу после установки пробую зайти в администрирование. страница загружается 1 мин 20 сек или 1 мин 19 сек.. пробовал несколько раз - так что это выглядит очень похожим на какую то систему.

причем я заходил как локально так и по сети на комп с установленным друпалом - время одно и то же. 80 или 79 сек.

что я только не пробовал: отключал почти все модули, отключал cleanurl - ничего не помогает. дошло до того что просто переустанавливал и смотрел как оно работает сразу после установки - результат не изменился.. хотя с того же архива ставлю друпал на виндовую машину с денвером соответсвенно - все просто летает Sad

обидно что с lamp довольно давно работаю и знаю (на начальном уровне) как все ставиться и настраивается - и ничего не могу поделать. сам пхп и апач работает отлично.. к примеру тестовый скрипт

<?php
$defaul_it = 1000000;

if(isset($_GET['c']))
{
$iterations = $_GET['c'];
}
else
{
echo "\"c\" not exist! Try to exec ".$PHP_SELF." using variable \"c\" with some value.

";
echo "Now \"c\" will be set ".$defaul_it."

";
$iterations = $default_it;

}

$s_time = date('h:i:s:u');

echo "Test of productivity ".$iterations." iterations :

";
echo "Test startted at ".$s_time."

";
$i = 0;
$j = 0;

for($i = 1; $i <= $iterations; $i++)
{
$j++;
}
$f_time = date('h:i:s:u');

echo "Test finisheded at ".$f_time;

?>

отрабатывает мигом. как локально так и по сети. прбовал 50 000 000 итераций - выполняется за 19 секунд. причем проводил серию опытов - результат постояне.

приведу детали системы (Ubuntu 8.04 desktop с установленным mysql, php, apache)

jameel@jameel-laptop:~$ uname -a
Linux jameel-laptop.IVC 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008 i686 GNU/Linux

jameel@jameel-laptop:~$ apache2ctl -v
Server version: Apache/2.2.8 (Ubuntu)
Server built: Jun 25 2008 13:54:13

jameel@jameel-laptop:/usr/lib$ php -v
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:44:49)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

версия mysql

Your MySQL connection id is 98
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)

теперь файлы конфигурации.

apache2.conf (привожу без закоментированных строк, чтобы было короче. в принципе ам все вроде по умолчанию. меняю обычно настройки через .htaccess)

ServerRoot "/etc/apache2"

#
#
LockFile /var/lock/apache2/accept.lock
#
#

#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 0

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#

Order allow,deny
Deny from all

DefaultType text/plain

HostnameLookups Off

ErrorLog /var/log/apache2/error.log

LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

ServerTokens Full

ServerSignature On

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

далее конфиг виртуальной директории

drupal.conf

ServerName "drupal-kovalov"
ServerAdmin webmaster@localhost
DocumentRoot /home/jameel/prj/php/vhosts/drupal-kovalov/www/

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /home/jameel/prj/php/vhosts/drupal-kovalov/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/drupal-kovalov_error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/drupal-kovalov_access.log combined
ServerSignature On

теперь /etc/hosts

10.2.42.37 jameel-laptop.IVC jameel-laptop
127.0.0.1 drupal-kovalov.IVC drupal-kovalov

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

конфиги друпала непосредственно абсолютно стандартные без каких либо изменений, но приведу и их

settings.php

<?php
// $Id: default.settings.php,v 1.8 2007/12/20 09:35:10 goba Exp $

$db_url = 'mysqli://drupal-kovalov:123@localhost/drupal-kovalov';
$db_prefix = '';

$update_free_access = FALSE;

/**
* PHP settings:
*
* To see what PHP settings are possible, including whether they can
* be set at runtime (ie., when ini_set() occurs), read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which non-runtime
* settings are used there. Settings defined here should not be
* duplicated there so as to avoid conflict issues.
*/
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');


теперь .htaccess

# Protect files and directories from prying eyes.

Order allow,deny

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.

ErrorDocument 404 "The requested file favicon.ico was not found.

# Set the default handler.
DirectoryIndex index.php

# PHP 4, Apache 1.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

# PHP 4, Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

# PHP 5, Apache 1 and 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

# Requires mod_expires to be enabled.

# Enable expirations.
ExpiresActive On

# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600

# Do not cache dynamically generated pages.
ExpiresByType text/html A1

# Various rewrite rules.

RewriteEngine off

## RewriteBase /

## RewriteCond %{REQUEST_FILENAME} !-f
## RewriteCond %{REQUEST_FILENAME} !-d
## RewriteCond %{REQUEST_URI} !=/favicon.ico
## RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

#php_value upload_max_filesize 5M

# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $

вроде бы все написал... подскажите плз КУДА копать?

спасибо заранее!!

Комментарии

Аватар пользователя tradakad tradakad 30 июля 2008 в 14:17

спасибо всем за помощь и подсказки, разобрался сам.

при установке нужно просто убрать галочку automatic updates - и все ок..