Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2008, 09:17 AM
Nassou Nassou is offline
 
Join Date: Mar 2007
Location: PHP
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default server surcharge

Hi guys

i have a big big probleme with surcharge of my server and database error !


I think that a relationship with the hack: good now when I turn these hack is the catalyst:

Cyb - Statistics Advanced Forum
Latest X Threads Forum on Home
vBSEO
vBSEO:: Sitemap Generator

I looks on with TOP, so I watch httpd very frequent and mysqld

What is surprising is that the former host while niquel worked with these hack but this is the big overload what's more I really need this hack!

I present below my configuration:

httpd.conf

Citation:
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.

ServerRoot "/etc/httpd"
Listen 80

#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
#LoadModule php5_module /usr/lib/apache/libphp5.so
Include /etc/httpd/conf/extra/httpd-phpmodules.conf

User apache
Group apache

ServerAdmin admin@localhost
DocumentRoot "/var/www/html"

<Directory /home/*>
AllowOverride All
Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

<Directory />
Options All
AllowOverride All
</Directory>

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_UserGroup webapps webapps
</IfModule>
</Directory>

<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog /var/log/httpd/error_log
LogLevel warn

<IfModule log_config_module>
#replace %b with %O for more accurate logging
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%O" bytes

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog /var/log/httpd/access_log common
</IfModule>

<IfModule alias_module>
# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf
</IfModule>

<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-gzip .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType video/x-ms-asf .avi
AddType video/mpeg .mpg
AddType video/mpeg .mpeg
AddType video/quicktime .mov
AddType video/x-ms-wmv .wmv
</IfModule>

#EnableMMAP off
#EnableSendfile off

################################################## #####################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
################################################## #####################################

# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

# Deflate module settings
Include conf/extra/httpd-deflate.conf

# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

# All suPHP directives
Include conf/extra/httpd-suphp.conf

# All the other includes needed by the custombuild script
Include conf/extra/httpd-includes.conf

################################################## #####################################
# End of included files that are rewritten by DirectAdmin #
################################################## #####################################

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

my.cnf

Citation:
[mysqld]
local-infile=0
socket=/tmp/mysql.sock
skip-name-resolve
safe-show-database
#old_passwords
back_log = 50
skip-innodb
max_connections = 800
key_buffer_size = 640M
myisam_sort_buffer_size = 128M
join_buffer_size = 2M
read_buffer_size = 2M
sort_buffer_size = 8M
table_cache = 4000
thread_cache_size = 512
wait_timeout = 60
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 16
concurrent_insert = 2
table_lock_wait_timeout = 30
read_rnd_buffer_size = 1M
bulk_insert_buffer_size = 32M
query_cache_limit = 6M
query_cache_size = 288M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_write_lock_count = 16

[mysqld_safe]
nice = -10
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 512M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

############################################

AND DATABASE ERROR

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (11)

Database error in vBulletin 3.7.4:

Invalid SQL:

SELECT
user.username, (user.options & 512) AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity, session.useragent,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1226049603
ORDER BY username ASC;

MySQL Error : MySQL server has gone away
Error Number : 2006

####################################"

####################
server configuration
RAM : 1GB DDRAM
HDD : 160 GB
CPU : Intel 1 X Core Duo T2450
Linux Debian
#####################
EDIT:
Version vBulletin : 3.7.4
PHP 5.2.6
Serveur web : apache2handler
Version MySQL 5.0.67
users online : de 100 ~ 150 ~ 300 ~ 380
Reply With Quote
  #2  
Old 11-07-2008, 11:44 AM
Angel-Wings's Avatar
Angel-Wings Angel-Wings is offline
 
Join Date: Sep 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well - please take a look first at your Apache / MySQL Configuration - specially the Apache one.
If the shown configuration is really running, this should be your priority right now
Reply With Quote
  #3  
Old 11-07-2008, 11:48 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, first off, where ever you got those my.cnf settings, you need to revise them, if what you posted is right and you only have 1gb of ram in this server, those settings are way to high!

These settings should be corrected before you proceed any further.

Once you correct my.cnf, restart mysql, as well, enable logging in my.cnf

Also, your apache settings are fine, only you didn't post your start, min, max server settings, which shouldnt be a issue anyways.
Reply With Quote
  #4  
Old 11-07-2008, 12:01 PM
Nassou Nassou is offline
 
Join Date: Mar 2007
Location: PHP
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have corrected my.cnf to these values

my.cnf

[mysqld]
socket=/tmp/mysql.sock
local-infile=0
skip-locking
#skip-innodb
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_connections=800
interactive_timeout=100
wait_timeout=100
connect_timeout=10
thread_cache_size=128
key_buffer=16M
join_buffer=1M
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=2
myisam_sort_buffer_size=64M
server-id=1

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=64M
sort_buffer=64M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout


But always the same probleme
i think this bug is wuth my apache config !!!

Quote:
Also, your apache settings are fine, only you didn't post your start, min, max server settings, which shouldnt be a issue anyways.
How to post this ?
Reply With Quote
  #5  
Old 11-07-2008, 12:09 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those settings are a bit tricky at times to find, depending on what OS & Apache version you run, as well as the web host manager that you might also run.

Typically they are in the httpd.conf/apache.conf file, sometimes they are in the extra or modules directory of apache in the mpm.conf file.

Change the following & restart mysql.
wait_timeout = 60
connect_timeout = 60
max_allowed_packet = 32M <-- I doubt this one is the issue, but its possible.
Reply With Quote
  #6  
Old 11-07-2008, 02:35 PM
Nassou Nassou is offline
 
Join Date: Mar 2007
Location: PHP
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Always the same probleme

database error can't connect to mysql server and mysql server has gone away !
Reply With Quote
  #7  
Old 11-07-2008, 03:25 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nassou View Post
Always the same probleme

database error can't connect to mysql server and mysql server has gone away !
This is from having bad mysql settings or your mysql process constantly crashing. Depending on your traffic and resource usuage you may have to upgrade your server, or optimize it further.

What does your server loads look like during your peak times or when these errors are occuring.
Reply With Quote
  #8  
Old 11-08-2008, 07:23 AM
Nassou Nassou is offline
 
Join Date: Mar 2007
Location: PHP
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now , i have increase timeout but the forum is too long for loading !


This server configuration:

####################
server configuration
RAM : 1GB DDRAM
HDD : 160 GB
CPU : Intel 1 X Core Duo T2450
Linux Debian
#####################

with a total of 300 ~ 400 users online is not enough for vBulletin?
Reply With Quote
  #9  
Old 11-08-2008, 08:30 AM
royo royo is offline
 
Join Date: Jan 2005
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you are using a cheap server, with low amounts of RAM and a laptop processor.
Reply With Quote
  #10  
Old 11-08-2008, 09:05 AM
Angel-Wings's Avatar
Angel-Wings Angel-Wings is offline
 
Join Date: Sep 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So long to "fine" Apache settings

Quote:
Originally Posted by Nassou View Post
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
Except you use WebDav - which shouldn't be used:

<LimitExcept GET POST>
Order deny,allow
Deny from all
</LimitExcept>

Will be enough.

Quote:
Originally Posted by Nassou View Post
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
If you don't use .htaccess - change AllowOverride to "AllowOverride None"

Quote:
Originally Posted by Nassou View Post
<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_UserGroup webapps webapps
</IfModule>
</Directory>
If you don't have a Vhost running - use mod_php or FastCGI instead of suPHP

Quote:
Originally Posted by Nassou View Post
<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>
DirectoryIndex index.php

Will be enough for Vbulletin

Quote:
Originally Posted by Nassou View Post
Include conf/extra/httpd-mpm.conf
Here are the min / max server settings configured.

Quote:
Originally Posted by Nassou View Post
Include conf/extra/httpd-multilang-errordoc.conf
Include conf/extra/httpd-autoindex.conf
Include conf/extra/httpd-languages.conf
Include conf/extra/httpd-info.conf
Include conf/extra/httpd-vhosts.conf
Include conf/extra/httpd-dav.conf
Include conf/extra/httpd-ssl.conf
Include conf/extra/httpd-deflate.conf
Include conf/extra/directadmin-vhosts.conf
Include conf/extra/httpd-suphp.conf
Here some sorting out can be done as well. If you don't use DAV / SSL as example.

And:

Quote:
Originally Posted by Nassou View Post
<Directory />
Options All
AllowOverride All
</Directory>
Why is this there ? Shouldn't it be:

<Directory />
AllowOverride None
Order deny,allow
Deny from all
</Directory>

So far to "fine" Apache settings
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04677 seconds
  • Memory Usage 2,283KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete