PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Can´t connect in class_core.php


Omega409
08.05.2007, 14:23
Ich erhalte folgende Fehlermeldungen, nur dann wenn ich > 250 User auf dem Server habe!

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) /srv/www/web1/html/forum/includes/class_core.php on line 273

Skript und Referrer sind unterschiedlich! Ich vermute mal das ich da vor ein Timeout laufe!

Server Root, Linux 9.3, 1 GB Speicher, Mysql 4.1.20 max.

Meine my.cnf

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable=max_connections=500
key_buffer = 192M
max_allowed_packet = 16M
table_cache = 256
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M


server-id = 1
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


Jemand eine Idee? Was kann ich verändern?

nillsen
11.05.2007, 14:17
kommentiere mal die zeile

set-variable=max_connections=500

aus. Normalerweise solltest du aber "too many connections" bekommen.
Der Inhalt der

/var/lib/mysql/mysqld.log

wäre interessant.

Gruß.

Omega409
14.05.2007, 14:17
kommentiere mal die zeile

set-variable=max_connections=500

aus. Normalerweise solltest du aber "too many connections" bekommen.


Dann hab ich ein ernstes Problem mit meinem Posteingang! Dann werde ich mit Mails überschüttet. Dazu habe ich zu viele User drauf!



Der Inhalt der

/var/lib/mysql/mysqld.log

wäre interessant.

Gruß.

Wirklich interessant ist der nicht! Da steht nix drin :rolleyes:

Jetzt drängt es ein wenig! Ich denke, spätestens Sonntag habe ich dann ein massives Problem. Und ich würd gern ein Bierchen zum Aufstieg trinken und nicht Funktionen des Board schon im stadion abschalten müssen! Danke für eure Hilfe!

s.molinari
14.05.2007, 16:11
Hi Omega409,

Der Fehler kommt von PHP also muss das Problem an einer PHP Einstellung liegen. Schaue in deiner php.ini Datei was du für die Variable "mysql.max_links" hast. Diese Nummer musst du möglicherweise erhöhen.

http://us.php.net/manual/de/ref.mysql.php#ini.mysql.max-links

Scott

Omega409
14.05.2007, 16:26
Hallo Scott,

vielen Dank für den Tip.

Aber so richtig weiter bringt der mich nicht!


; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1

BTW: PHP Version 5.2.1, Postgröße 8 MB, Uploadgröße 2 MB, Speicherlimit 32 MB (auf 32 MB geändert wegen LINK (http://www.vbulletin-germany.com/forum/showthread.php?t=29686) )


Andreas

s.molinari
14.05.2007, 17:15
aja, dann möglicherweise hast du einfach ein Problem mit Serverleistung. 1GB kann durchaus zu wenig RAM für 250+ besucher sein, besonders wenn sie die Hybrid- oder Baumdarstellung benutzen.

Füge in deiner my.cnf die folgenden Werte ein:

key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

Die Einstellungen, die du hast, sind für einen sehr grossen Server und fressen möglicherweise mehr Resourcen als nötig. Falls andere Probleme auftauchen, erhöhe die Werte x 2 bis ein Kompromiss gefunden wird.

Vergesse nicht den Mysql Server neu zu starten.;)

Scott

Omega409
14.05.2007, 18:30
Wasserstandsmeldung:

Ich habe die von oben Werte eingetragen! Dann ging der Serverload so was von hoch ( > 20) und auf dem Forum tat sich fast gar nichts mehr!

Jetzt habe ich alle Werte verdoppelt und es läuft bei jetzt knapp 200 Usern relativ gut (Serverload <5).

Ich denke, wir brauchen wohl einen neuen Server! :( Schaun wir mal wo wir nächstes Jahr spielen. Wir haben ja die ganze Sommerpause ;) :D

Christian
14.05.2007, 19:03
Schalt mal den Query Cache an:

query-cache-type = 1
query-cache-size = 20M
query-cache-limit = 2M

s.molinari
14.05.2007, 19:20
Ich denke, wir brauchen wohl einen neuen Server! :( Schaun wir mal wo wir nächstes Jahr spielen. Wir haben ja die ganze Sommerpause ;) :DIch würde zuerst den RAM erweitern und schaue wie er dann läuft.

Scott

Omega409
15.05.2007, 09:46
Schalt mal den Query Cache an:

query-cache-type = 1
query-cache-size = 20M
query-cache-limit = 2M

Vielen Dank Christian. Ich habe die Parameter eingestellt und habe den Eindruck das der Server jetzt ein wenig "runder" läuft!

Ich würde zuerst den RAM erweitern und schaue wie er dann läuft.
Scott

top - 09:40:31 up 54 days, 18:43, 1 user, load average: 1.47, 1.32, 1.15
Tasks: 96 total, 2 running, 94 sleeping, 0 stopped, 0 zombie
Cpu(s): 34.7% us, 1.7% sy, 0.0% ni, 63.3% id, 0.0% wa, 0.3% hi, 0.0% si
Mem: 1001744k total, 455632k used, 546112k free, 27328k buffers
Swap: 1052248k total, 45660k used, 1006588k free, 252516k cached


So sieht es zur Zeit bei ca. 140 Usern aus. Ich habe gestern leider vergessen diese Daten zu kopieren. Die CPU Auslastung lag deutlich über 90 %. Und wenn ich mir die Speicherwerte ansehe (die haben sich seit gestern nicht großartig verändert), sollte da eigentlich "Luft" sein. Für mich sieht es eher nach einem CPU Problem aus!

s.molinari
15.05.2007, 15:42
Für mich sieht es eher nach einem CPU Problem aus!Kann auch sein.:) Was für CPU hast du?

Scott

Omega409
15.05.2007, 20:35
Kann auch sein.:) Was für CPU hast du?

Scott

Ist ein AMD Opteron 144, 1800 MHz nativ!

Hier mal die Werte bei 200 Usern

top - 20:24:02 up 55 days, 5:26, 1 user, load average: 5.59, 6.63, 6.03
Tasks: 143 total, 8 running, 135 sleeping, 0 stopped, 0 zombie
Cpu(s): 87.8% us, 5.0% sy, 0.0% ni, 7.3% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 1001744k total, 372284k used, 629460k free, 3608k buffers
Swap: 1052248k total, 122396k used, 929852k free, 105580k cached


top - 20:32:24 up 55 days, 5:35, 1 user, load average: 11.31, 6.48, 6.00
Tasks: 161 total, 2 running, 158 sleeping, 0 stopped, 0 zombie
Cpu(s): 90.1% us, 4.8% sy, 0.0% ni, 4.8% id, 0.0% wa, 0.3% hi, 0.0% si
Mem: 1001744k total, 435800k used, 565944k free, 5712k buffers
Swap: 1052248k total, 119676k used, 932572k free, 148316k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21467 wwwrun 15 0 27660 11m 1652 S 14.4 1.2 0:00.70 httpd2-prefork
22026 wwwrun 15 0 21336 5620 1616 S 12.8 0.6 0:00.47 httpd2-prefork
20598 wwwrun 15 0 21404 5732 1648 S 12.5 0.6 0:02.17 httpd2-prefork
18228 wwwrun 16 0 22932 7276 1652 S 10.9 0.7 0:09.36 httpd2-prefork
21466 wwwrun 15 0 21492 5816 1652 S 9.3 0.6 0:01.13 httpd2-prefork
20547 wwwrun 16 0 21544 5888 1648 S 7.0 0.6 0:04.56 httpd2-prefork
20779 wwwrun 15 0 23064 7468 1664 S 6.4 0.7 0:04.44 httpd2-prefork
29599 mysql 16 0 139m 53m 2300 S 3.8 5.5 34:18.67 mysqld-max
20783 wwwrun 15 0 21460 5788 1652 S 2.9 0.6 0:02.12 httpd2-prefork
21669 wwwrun 15 0 21412 5716 1640 S 2.9 0.6 0:01.28 httpd2-prefork
21855 wwwrun 15 0 21340 5656 1640 S 1.6 0.6 0:00.40 httpd2-prefork
21917 wwwrun 15 0 20852 4888 1492 S 1.6 0.5 0:00.05 httpd2-prefork
21450 wwwrun 15 0 21360 5656 1624 S 0.6 0.6 0:00.63 httpd2-prefork
22011 wwwrun 15 0 20848 4924 1492 S 0.6 0.5 0:00.10 httpd2-prefork
11023 root 18 0 3276 680 568 S 0.3 0.1 0:35.42 pipelog.pl
5882 root 15 0 0 0 0 S 0.3 0.0 0:00.09 pdflush
17878 wwwrun 16 0 21428 5764 1648 S 0.3 0.6 0:10.09 httpd2-prefork

s.molinari
15.05.2007, 21:30
hmm. jup, du hast Recht.:)

Besser einen neuen Server (mit mehr RAM);)

Scott

Schraubär
17.05.2007, 15:38
Bei mir: Gleiche Menge RAM und nen Opteron 146.

Also solche Einbrüche hab ich nicht.
Ich dümpel bei ~80% idle herum.

Bei Dir ist das System ja fast restlos ausgelastet...


Tasks: 119 total, 2 running, 117 sleeping, 0 stopped, 0 zombie
Cpu(s): 14.3% us, 1.2% sy, 0.0% ni, 81.7% id, 2.2% wa, 0.1% hi, 0.5% si
Mem: 970004k total, 913968k used, 56036k free, 27848k buffers
Swap: 979924k total, 71220k used, 908704k free, 442176k cached

Omega409
17.05.2007, 16:32
Ich kann das ganze noch toppen! Es ist nicht nur ein CPU Problem!

top - 14:37:05 up 56 days, 23:39, 1 user, load average: 91.16, 54.81, 29.76
Tasks: 226 total, 1 running, 225 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3% us, 1.3% sy, 0.0% ni, 0.0% id, 96.7% wa, 0.3% hi, 1.3% si
Mem: 1001744k total, 990016k used, 11728k free, 456k buffers
Swap: 1052248k total, 866440k used, 185808k free, 9884k cached


Habe mich heute gezwungen gesehen, Registrierungen nicht mehr zuzulassen, Spielhalle + Fotogalerie abzuschalten um den Server über das WE zu retten!

Schraubär
17.05.2007, 18:44
Schau mal nach was bei Dir da so viel CPU-Time frisst.
Ist ja nicht normal was bei Dir gefressen wird.

War das schon immer oder erst seit kurzem ?

Wenn Du den Prozess nicht findest -> reboot

Zeig mal Deine Apache Config

Omega409
21.05.2007, 14:54
Schau mal nach was bei Dir da so viel CPU-Time frisst.
Ist ja nicht normal was bei Dir gefressen wird.

Der IO. Server "swapt" sich irgendwann zu tode :(


War das schon immer oder erst seit kurzem ?


Hab erst seit letzter Zeit so viele User gleichzeitig Online. Jetzt nach dem Aufstieg geht fast nix mehr. Alle zwei Minuten eine neue Registrierung!

Wenn Du den Prozess nicht findest -> reboot
Ich muss immer Apache und Mysql neu starten. Dann läuft er wieder bis ich so an die 300 User komm. Und dann fängt er an zu swappen, bis nix mehr geht!


Zeig mal Deine Apache Config

Bitte:

### Global Environment ######################################################
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests.

# run under this user/group id
Include /etc/apache2/uid.conf

# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
ErrorLog /var/log/apache2/error_log

# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf

# IP addresses / ports to listen on
Include /etc/apache2/listen.conf

# predefined logging formats
Include /etc/apache2/mod_log_config.conf

# generated from global settings in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/global.conf

# optional mod_status, mod_info
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf

# optional cookie-based user tracking
# read the documentation before using it!!
Include /etc/apache2/mod_usertrack.conf

# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf

# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

# set up (customizable) error responses
Include /etc/apache2/errors.conf

# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var

### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf


# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf


### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf


# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier :)
## CONFIXX
<Directory "/srv/www/confixx/html">
AllowOverride all
</Directory>
NameVirtualHost 85.25.10.72:80
<VirtualHost 85.25.10.72:80>
ServerName kilo041.server4you.de
#User confixx
#Group users
DocumentRoot /srv/www/confixx/html
Alias /phpMyAdmin /srv/www/htdocs/phpMyAdmin
php_admin_value safe_mode Off
php_admin_value safe_mode_exec_dir /srv/www/confixx/bin
php_admin_value upload_tmp_dir /srv/www/confixx/tmp
php_admin_value open_basedir none
ScriptAlias /cgi-bin/ /srv/www/confixx/html/cgi-bin/
CustomLog /var/log/apache2/kilo041.server4you.de_access.log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\""
ErrorLog /var/log/apache2/kilo041.server4you.de_error.log
</VirtualHost>
Include /etc/apache2/confixx_vhost.conf
# ^- Dieser Eintrag sollte unbedingt am Ende der Datei bleiben
## /CONFIXX
php_value short_open_tag 1
php_value register_globals 1


Domain und IP geändert!

Andreas
21.05.2007, 14:56
RAM ist leider durch nichts zu ersetzen ... außer durch mehr RAM ;)
Dass die Kiste nur noch am swappen ist zeigt IMHO sehr deutlich dass zuwenig RAM vorhanden ist.

Schraubär
22.05.2007, 12:51
Einmal die /etc/apache2/server-tuning.conf bitte.

@Andreas

Bei der Anzahl user (200-300) sind 1GB absolut ausreichend.
Wenn nicht, sollte man sich fragen, warum VB so viel verbrät :D

Erinnert mich an Zeiten als VB3 noch Beta, Gamma etc. war.
Da war der Speicherverbrauch die Hölle.

Wie gesagt, ich fahr etwa die gleiche Last ebenfalls mit VB bei gleichem Speicher.
CPU nur 200 MHz mehr.

Und habe solche Probleme nur am Anfang gehabt in der Basiskonfiguration.
Anonsten kann ich Dir meine Einstellungen anbieten.
Sollten ja grösstenteils 1:1 passen.

Gruß

Omega409
22.05.2007, 13:14
Einmal die /etc/apache2/server-tuning.conf bitte.


Bitte schön!

##
## Server-Pool Size Regulation (MPM specific)
##

# the MPM (multiprocessing module) is not a dynamically loadable module in the
# sense of other modules. It is a compile time decision which one is used. We
# provide different apache2 MPM packages, containing different httpd2 binaries
# compiled with the available MPMs. See APACHE_MPM in /etc/sysconfig/apache2.

# prefork MPM
<IfModule prefork.c>
# number of server processes to start
StartServers 5
# minimum number of server processes which are kept spare
MinSpareServers 5
# maximum number of server processes which are kept spare
MaxSpareServers 10
# highest possible MaxClients setting for the lifetime of the Apache process.
ServerLimit 150
# maximum number of server processes allowed to start
MaxClients 150
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# worker MPM
<IfModule worker.c>
# initial number of server processes to start
StartServers 2
# minimum number of worker threads which are kept spare
MinSpareThreads 25
# maximum number of worker threads which are kept spare
MaxSpareThreads 75
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# leader MPM
<IfModule leader.c>
# initial number of server processes to start
StartServers 2
# minimum number of worker threads which are kept spare
MinSpareThreads 25
# maximum number of worker threads which are kept spare
MaxSpareThreads 75
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 0
</IfModule>

# perchild MPM
<IfModule perchild.c>
# constant number of server processes
NumServers 5
# initial number of worker threads in each server process
StartThreads 5
# minimum number of worker threads which are kept spare
MinSpareThreads 5
# maximum number of worker threads which are kept spare
MaxSpareThreads 10
# maximum number of worker threads in each server process
MaxThreadsPerChild 20
# maximum number of connections per server process
MaxRequestsPerChild 0

AcceptMutex fcntl
</IfModule>

# metux MPM
<IfModule metuxmpm.c>
# initial number of worker threads in each server process
StartThreads 5
# minimum number of worker threads which are kept spare
MinSpareThreads 5
# maximum number of worker threads which are kept spare
MaxSpareThreads 10
# maximum number of connections per server process
MaxRequestsPerChild 0

Multiplexer "wwwrun" "www"

</IfModule>


#
# 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 15

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
#
#EnableSendfile off


#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully



Ich habe jetzt fast alles deaktiviert was ich nur deaktivieren konnte. Ich habe ja auch diverse Hacks installiert (Danke-hack, Galerie, Spielhalle etc), alles ist aus was auszuschalten ist! Ebenso die "Fresser": Wer ist Online usw.

Irgendwie versuche ich das Forum am Leben zu halten (Gestern drei Neustarts :( )
Ich muss jetzt einfach nochmal abwarten bis ich in die 300´er Gegend komme. Forum läuft jetzt, so nacked, bei 200 Usern sehr sehr rund!

Andreas
22.05.2007, 14:00
@Schraubär
Kommt darauf an (Query Cache Size, etc.).
Meine Erfahrung sagt dass es ab ca. 300 mit 1 GB verdammt eng wird.

Omega409
22.05.2007, 14:11
@Schraubär
Kommt darauf an (Query Cache Size, etc.).
Meine Erfahrung sagt dass es ab ca. 300 mit 1 GB verdammt eng wird.

Da ich ja jetzt für die 1. Liga planen muss :) Wird es dann bei 2 GB bei 600 Usern wieder knapp? Hat jemand ein paar Werte an denen ich mich orientieren kann?

Fakt ist für mich der: Keine langfristigen Verträge mehr! (S4Y kann/will keine Speichererweiterung vornehmen). Als wir vor 18 Monaten der Server gemietet haben, dachte jeder das reicht dicke! Jetzt gehen wir auf dem Zahnfleisch! wir werden wohl 4 Monate doppelt zahlen dürfen :(

DerPate
22.05.2007, 22:46
Da ich ja jetzt für die 1. Liga planen muss :) Wird es dann bei 2 GB bei 600 Usern wieder knapp? Hat jemand ein paar Werte an denen ich mich orientieren kann?

Fakt ist für mich der: Keine langfristigen Verträge mehr! (S4Y kann/will keine Speichererweiterung vornehmen). Als wir vor 18 Monaten der Server gemietet haben, dachte jeder das reicht dicke! Jetzt gehen wir auf dem Zahnfleisch! wir werden wohl 4 Monate doppelt zahlen dürfen :(

Was bist du denn bereit auszugeben ??

hier z.b. http://www.manitu.de/serverhousing/

läuft u.a auch das ioff.de drauf und die haben massig User gleichzeitig online.

Schraubär
23.05.2007, 09:36
server-tuning.conf


##
## Server-Pool Size Regulation (MPM specific)
##

# the MPM (multiprocessing module) is not a dynamically loadable module in the
# sense of other modules. It is a compile time decision which one is used. We
# provide different apache2 MPM packages, containing different httpd2 binaries
# compiled with the available MPMs. See APACHE_MPM in /etc/sysconfig/apache2.

# prefork MPM
<IfModule prefork.c>
# number of server processes to start
StartServers 10
# minimum number of server processes which are kept spare
MinSpareServers 12
# maximum number of server processes which are kept spare
MaxSpareServers 18
# highest possible MaxClients setting for the lifetime of the Apache process.
ServerLimit 150
# maximum number of server processes allowed to start
MaxClients 120
# maximum number of requests a server process serves
MaxRequestsPerChild 1000
</IfModule>

# worker MPM
<IfModule worker.c>
# initial number of server processes to start
StartServers 10
# minimum number of worker threads which are kept spare
MinSpareThreads 25
# maximum number of worker threads which are kept spare
MaxSpareThreads 75
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 1000
</IfModule>

# leader MPM
<IfModule leader.c>
# initial number of server processes to start
StartServers 7
# minimum number of worker threads which are kept spare
MinSpareThreads 10
# maximum number of worker threads which are kept spare
MaxSpareThreads 15
# maximum number of simultaneous client connections
MaxClients 150
# constant number of worker threads in each server process
ThreadsPerChild 25
# maximum number of requests a server process serves
MaxRequestsPerChild 1000
</IfModule>

# perchild MPM
<IfModule perchild.c>
# constant number of server processes
NumServers 7
# initial number of worker threads in each server process
StartThreads 8
# minimum number of worker threads which are kept spare
MinSpareThreads 10
# maximum number of worker threads which are kept spare
MaxSpareThreads 15
# maximum number of worker threads in each server process
MaxThreadsPerChild 25
# maximum number of connections per server process
MaxRequestsPerChild 1000

AcceptMutex fcntl
</IfModule>

# metux MPM
<IfModule metuxmpm.c>
# initial number of worker threads in each server process
StartThreads 8
# minimum number of worker threads which are kept spare
MinSpareThreads 10
# maximum number of worker threads which are kept spare
MaxSpareThreads 15
# maximum number of connections per server process
MaxRequestsPerChild 1000

Multiplexer "wwwrun" "www"

</IfModule>


#
# 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 350

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

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
#
#EnableSendfile off


#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully


my.cnf


# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable=max_connections=2500
key_buffer = 64M
max_allowed_packet = 16M
table_cache = 256
sort_buffer_size = 8M
net_buffer_length = 8K
read_buffer_size = 4M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M


server-id = 1
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 32M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


Ist weitgehend meine Konfiguration...

Omega409
04.11.2007, 20:55
Ich muss den Thread nochmal hervorholen. Wir haben jetzt einen neuen Server. Suse 10.1, Athlon 64 3800, 2 GB Speicher. Server läuft eigentlich ganz gut und einwandfrei. Hie und da passiert folgendes. Wenn, wie z.B. wie heute abend gut 350 Leute auf dem Server sind und dazu gut 200 User in einem Thread, reißt die Verbindung zum MYSql wieder ab.

mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11)

Die Parameter für MYSQL:

# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 16K
read_buffer_size = 512K
read_rnd_buffer_size = 1024K
myisam_sort_buffer_size = 8M
query-cache-type = 1
query-cache-size = 20M
query-cache-limit = 2M
set-variable = max_allowed_packet=2M
set-variable = myisam_sort_buffer_size=16M
set-variable = sort_buffer=1024K
set-variable = max_connections=500
set-variable = key_buffer=32M


Serverload liegt bei gut 20! Er swappt aber nicht! Viel Platz ist im Speicher nicht mehr, aber der "Swap-Platz" wir nur minimal angefasst.
Jetzt sind Ideen gefragt! Was kann ich noch tun?