Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » В помощь системному администратору » Проблемы Apache+PHP+MySQL: сайт тормозит либо не отвечает

Модерирует : lynx, Crash_Master, dg, emx, ShriEkeR

 Версия для печати • ПодписатьсяДобавить в закладки

Открыть новую тему     Написать ответ в эту тему

Vic

Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
имеем Apache/2.0.48 (Win32) PHP/4.3.4 MySQL/4.0.17, все это крутится на 2-х Xeon-ах 3.2 Ггц, с 2 гигами памяти, так вот иногда сайт начинает тормозить, либо вообще неотзывается, как будто в дауне. В логах ничего подозрительного нет, причем неясно, началось это пара недель назад, с чего это вдруг, еще одна непонятная трабла заключается в том, приконектившись каким-нибудь MySQL-ным менеджеров(все равно каким), базы просто теряются, т.е. при обращении через www, вываливается ошибка internal error 23:Out of resources when opening file '.\website\baza.MYD' (Errcode: 24), помогает или репаир или рестарт MySQL. Эксперименты проводились также на Apache/2.0.48 (Win32) PHP/4.3.1 MySQL/4.0.15. Может кто сталкивался с такой ерундой или толкнет на правильную мыслю, я уже чего только не пробовал? Может заодно еще поможите с оптимизацией конф файлов?
 
Выдержки из hhtpd.conf
 
ServerRoot "C:/Program Files/Apache Group/Apache2"
PidFile logs/httpd.pid
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
 
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>
Listen 80
LoadModule php4_module php4apache2.dll
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
 
ServerAdmin postmaster@domain.ru
 
ServerName www.domain.ru:80
 
UseCanonicalName On
 
DocumentRoot "C:/Program Files/apache Group/apache2/Domainwww"
<Directory "C:/Program Files/apache Group/apache2/Domainwww">
    Options -Indexes Includes
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
 
DirectoryIndex index.html index.html.var
 
AccessFileName .htaccess
 
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
 
HostnameLookups Off
 
ErrorLog logs/error.log
LogLevel info
 
ServerTokens Full
 
ServerSignature On
 
теперь php.ini
 
; Enable the PHP scripting language engine under Apache.
engine = On
 
; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
short_open_tag = On
 
; Allow ASP-style <% %> tags.
asp_tags = Off
 
; The number of significant digits displayed in floating point numbers.
precision    =  14
 
; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
y2k_compliance = Off
 
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit.  You can enable output buffering during runtime by calling the output
; buffering functions.  You can also enable output buffering for all files by
; setting this directive to On.
output_buffering = Off
 
 
; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block.  This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block.  Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
implicit_flush = Off
 
expose_php = On
 
 
 
max_execution_time = 60     ; Maximum execution time of each script, in seconds
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)
 
 
error_reporting  =  E_ALL & ~E_NOTICE
 
; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On
 
; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off
 
; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On
 
; Warn if the + operator is used with strings.
warn_plus_overloading = Off
 
 
variables_order = "EGPCS"
 
register_globals = On
 
; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information).  If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On
 
; Maximum size of POST data that PHP will accept.
post_max_size = 5M
 
; This directive is deprecated.  Use variables_order instead.
gpc_order = "GPC"
 
; Magic quotes
;
 
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
 
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off    
 
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
 
; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =
 
; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
default_charset = "windows-1251"
 
 
 
; Whether or not to enable the dl() function.  The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
enable_dl = On
 
[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In
; runtime, you can define these variables by calling define_syslog_variables().
define_syslog_variables  = Off
 
 
[SQL]
sql.safe_mode = Off
 
 
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On
 
; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1
 
; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1
 
; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
' at MYSQL_PORT.
mysql.default_port =
 
; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
 
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
 
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
 
; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo cfg_get_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =
 
 
 
[Sockets]
; Use the system read() function instead of the php_read() wrapper.
sockets.use_system_read = On
 
и наконец my.ini
 
[client]
port=3306
 
# The MySQL server
[mysqld]
port=3306
skip-locking
set-variable= key_buffer=384M
set-variable= max_allowed_packet=1M
set-variable= table_cache=512
set-variable= sort_buffer=2M
set-variable= record_buffer=2M
set-variable= thread_cache=8
# Try number of CPU's*2 for thread_concurrency
set-variable= thread_concurrency=8
set-variable= myisam_sort_buffer_size=64M
server-id= 1
max_connections= 300
 
[mysqldump]
quick
set-variable= max_allowed_packet=16M
 
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
 
[isamchk]
set-variable= key_buffer=256M
set-variable= sort_buffer=256M
set-variable= read_buffer=2M
set-variable= write_buffer=2M
 
[myisamchk]
set-variable= key_buffer=256M
set-variable= sort_buffer=256M
set-variable= read_buffer=2M
set-variable= write_buffer=2M
 
[mysqlhotcopy]
interactive-timeout
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-max-nt.exe
 
спасибо что дочитали до конца моей проблемы, у кого какие идеи, выслушаю всех.

Всего записей: 333 | Зарегистр. 17-10-2001 | Отправлено: 18:26 29-01-2004 | Исправлено: lynx, 18:51 29-01-2004
lynx



Advanced lynx
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Vic
 

Цитата:
 базы просто теряются,

 
А как они получаются - базы? Посмотри их размер. Я все по прежнему грешу на увеличение нагрузки на сервер.

Всего записей: 11712 | Зарегистр. 08-05-2001 | Отправлено: 18:58 29-01-2004
Vic

Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
lynx

Цитата:
Я все по прежнему грешу на увеличение нагрузки на сервер

 
Размер базы небольшой, всего 11 мег, наврядли это, тачка мощная, раньше моментом все грузилось.

Всего записей: 333 | Зарегистр. 17-10-2001 | Отправлено: 09:37 30-01-2004
lynx



Advanced lynx
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Vic

Цитата:
 В логах ничего подозрительного нет,  

 
Уверен? Может, в этот момент кто-то активно качает тебя качалками?
 

Всего записей: 11712 | Зарегистр. 08-05-2001 | Отправлено: 13:46 30-01-2004
Vic

Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
lynx

Цитата:
Уверен? Может, в этот момент кто-то активно качает тебя качалками?  

 
Абсолютно уверен, нет ничего плохого в логах.
 
Пришел к выводу, что это глюки MySQL или винды, вот пытаюсь вычислить, кто из них дурит.

Всего записей: 333 | Зарегистр. 17-10-2001 | Отправлено: 14:37 30-01-2004
lynx



Advanced lynx
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Vic
 
Если говорить о Винде, то посмотри, что-то в ее логах имеется?

Всего записей: 11712 | Зарегистр. 08-05-2001 | Отправлено: 16:29 30-01-2004
Vic

Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
lynx

Цитата:
Если говорить о Винде, то посмотри, что-то в ее логах имеется?

 
смотрел конечно, ничего там нет, есть конечно, но для нас неинтересное.

Всего записей: 333 | Зарегистр. 17-10-2001 | Отправлено: 17:00 30-01-2004
Открыть новую тему     Написать ответ в эту тему

Компьютерный форум Ru.Board » Компьютеры » В помощь системному администратору » Проблемы Apache+PHP+MySQL: сайт тормозит либо не отвечает


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru