Apache stürzt ab

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Apache stürzt ab

Postby ProxiStyx » 14. February 2013 22:45

Hallo,

Es geht um die Konvertierung eines phpBB-2 in phpBB3-Forums über ein php-Skript, und jedes mal hängt sich der lokale Xamppserver bei der Konvertierung der posts mit folgenden Problemen auf:

    eine komplett weiße Seite, "Die Verbindung wurde durch den Server beendet" oder "Die Verbindung zum Server wurde zurückgesetzt, während die Seite geladen wurde." - je nach Browser

Beide Foren laufen auf ISO 8859-1.

Es kann daran liegen, dass das Forum groß ist (sql-backup 2,5GB) und das Skript damit nicht klar kommt (in diesem Fall würde ich es als shell-skirpt neu schreiben, doch das wollte ich mir als letzten Ausweg lassen) oder mein lokaler Xampp nicht richtig dafür konfiguriert ist. Ich wollte erst einmal letzteres überprüfen.

Da ich das ganze ja wie oben geschrieben lokal mache, habe unter anderem diese Werte gesetzt, nachdem es mit den Standardwerten nicht funktioniert hat:

    max_execution_time = 0; max_input_vars = 1000; memory_limit = 3750M; max_input_time = -1; sort_buffer_size = 512M; max_allowed_packet = 16M; max_input_time = -1; expect.timeout = -1; Plus im php-Skript: set_time_limit(0)

Im log steht nichts verwertbares. Hat jemand eine Idee was das Problem sein könnte, ich bin ziemlich ratlos.


Ich weiß, die Informationen sind sehr mager, aber ich weiß leider nicht was nützlich sein könnte...



PS: sowohol debug als auch error_reporting ist angeschaltet
Last edited by ProxiStyx on 15. February 2013 12:08, edited 7 times in total.
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 10:57

Du könntest ja doch wenigstens erklären, was Schritt 17 sein soll.

Insgesamt vermute ich einen Timeout (wild geraten), in php.ini wir die max_execution_time oft auf 30 Sekunden beschränkt. Normalerweise erscheint dann eine Fehlermeldung, aber oft sind bei Providern die Einstellungen dafür deaktiviert, so dass einfach nichts passiert.

Außerdem könntest Du uns erheblich präziser erklären, in welchem Umfeld Du arbeitest (Server im Internet, Rechner zu Hause, Linux, Windows, usw. - hier fehlt ja einfach alles).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:09

Edit: erster Posts ergänzt
Last edited by ProxiStyx on 15. February 2013 11:47, edited 6 times in total.
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 11:15

ProxiStyx wrote:max_execution_time = 60; max_input_vars = 1000; memory_limit = 6560M; max_input_time = -1; sort_buffer_size = 512M; max_allowed_packet = 16M


Mit anderen Worten: nur 60 Sekunden Execution Time - dann bricht das Script ab. Das dürfte die Ursache sein. Schau doch auch mal nach den display_error Einstellungen (die sind wahrscheinlich Off), deswegen kriegst Du keine vernünftige Meldung.

Ändere mal die Einstellungen für die Fehleranzeige in php.ini und setze außerdem max_execution_time = 0, das tut genau das Gegenteil dessen, wonach es aussieht, dann darf das Script beliebig lange laufen. Möglicherweise hast Du durch die Abbrüche schon Datenmüll hinterlassen, da musst Du mal schauen, ob Du ggf. irgendwelche Tabellen oder Datenbanken nochmal löschst und neu anlegst.

Nach jeder Änderung in php.ini musst Du Apache neu starten.

P.S.: Das Memory Limit ist Schwachsinn, PHP ist eine 32bit Anwendung und kann damit max. 4GB (unter Windows sogar nur 2GB; mehr bekommt ein Thread nicht zugeteilt) verwalten. Du gibst aber 6560M, das sind 6,5GB. Das ist Quatsch, setze das mal auf 256M oder so.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:18

Erst einmal danke, für deine Hilfe.


display_errors ist breits an, ebenso wie log_errors.

Die DB leere ich natürlich, aber ich versuche es nochmal mit max_execution_time = 0. Ich melde mich dann zurück, jedoch denke ich, dass das schon einmal versucht habe

Das sind noch andere Wert max_input_time = -1, expect.timeout = -1; Plus im php-Skript: set_time_limit(0)

PS Naja es schadet ja nicht mit dem, aber du hast natürlich Recht, mehr als 4GB ist Schwachsinn. Speicher habe ich trotzdem genug und einige Posts sind sehr lang und ich hatte schon Probleme mit Werten unter 500
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 11:25

Wo ist das Script für die Konvertierung? Vielleicht ist da irgendwo ein sinnfreier "Select * ..." drin und das überfordert das System bei 2 Millionen Datensätzen. Das muss man anders programmieren.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:27

Es ist das Standardskript von phpBB - also das vorinstallierte und zur Konvertierung gedachte. Ich denke, dass es daran kaum liegen kann...

Habe mich trotzdem darin schon ein paar Tage vertieft. War aber kaum hilfreich
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 11:29

ProxiStyx wrote:Es ist das Standardskript von phpBB. Ich denke, dass es daran kaum liegen kann


Ich schon. Außerdem, was bleibt Dir denn übrig? Wahrscheinlich musst Du das Script debuggen.

Ich finde das Script auf die Schnelle nicht, hast Du einen vollständigen Link?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:31

Naja, letztlich wollte ich mir das als letzten Ausweg lassen. Selbst eine Konvertierung über die Shell schreiben... ich hatte nur gehofft, dass es an xampp liegt, bzw. an der Konvertierung, sodass ich das fertige Skript einfach lokal laufen lassen kann.

Wenn ich mich nicht irre hat phpBB.de das selbst genau so gemacht
Last edited by ProxiStyx on 15. February 2013 11:33, edited 1 time in total.
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 11:32

ProxiStyx wrote:Naja, letztlich wollte ich mir das als letzten Ausweg lassen. Selbst eine Konvertierung über die Shell schreiben... ich hatte nur gehofft, dass es an xampp liegt, bzw. an der Konvertierung


Ich bräuchte mal einen Link auf das Konvertierungsscript (in der deutschen Community finde ich es nicht).
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:36

Es ist im Komplettpacket enthalten. Ich habe es dir hier kurz mal hochgeladen: link entfernt

PS: Ich kriege trotz der Einstellungen inkl. max_execution_time folgenden Fehler: Verbindung unterbrochen; Die Verbindung zum Server wurde zurückgesetzt, während die Seite geladen wurde.
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 11:45

Ich habe leider keine phpBB2 Installation, das ist dann etwas zu aufwändig. In der englischen Community habe ich aber auch genau diese Hinweise gefunden, dass so etwas passieren kann:

5.iv. Common conversion problems

Broken non-latin characters The conversion script assumes that the database encoding in the source phpBB2 matches the encoding defined in the lang_main.php file of the default language pack of the source installation. Edit that file to match the database's encoding and re-start the conversion procedure.

http 500 / white pages The conversion is a load-heavy procedure. Restrictions imposed by some server hosting providers can cause problems. The most common causes are: too low values for the php settings memory_limit and max_execution_time. Limits on the allowed CPU time are also a frequent cause for such errors, as are caps on the number of database queries allowed. If you cannot change such settings, then contact your hosting provider or run the conversion procedure on a different computer. The phpBB.com forums are also an excellent location to ask for support.


Vielleicht solltest Du auch die my.cnf (oder my.ini) für die Datenbank anpassen, in der Defaultauslieferung ist die nur für "Small" Database konfiguriert. Anscheinend schmiert die Datenbank ab. Nimm mal die Einstellungen aus der Beispielkonfiguration für "Huge". Und natürlich MySQL neu starten.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 11:52

Verzeih mir, aber wo finde ich die Beispielkonfigurationen. Konnte sie nicht finden.

Ich habe alle Installationen auf ISO 8859-1. Das erste sollte also kein Problem sein und settings memory_limit und max_execution_time habe ich ja wie oben erwähnt bereits angepasst

PS: habe den ersten Post ergänzt, damit die Informationen leichter zu erreichen sind
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Re: Apache stürzt ab

Postby Nobbie » 15. February 2013 12:17

ProxiStyx wrote:Verzeih mir, aber wo finde ich die Beispielkonfigurationen. Konnte sie nicht finden.


Wo wohl? Im MySQL Ordner (Du hast doch Xampp installiert?).

Unter C:/Xampp/Mysql gibt es

my-huge.ini
my-innodb-heavy.ini
my-large.ini
my-medium.ini
my-small.ini

Und im bin-Verzeichnis (C:/Xampp/Mysql/bin) steht die my.ini, die gültig ist. Nimm mindestens die Werte aus my-large.ini. Leider kann man die Dateien nicht einfach rüberkopieren, ein paar Schlüsselbegriffe sind in my.ini etwas anders (das wirst Du schon sehen), aber generell solltest Du ungefähr die Daten aus my-huge.ini übernehmen. Ich habe das bei mir kürzlich erst gemacht, hier meine my.ini (kannst Du auch übernehmen, ich habe die alten Werte auskommentiert):

Code: Select all
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# You can copy this file to
# C:/xampp/mysql/bin/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:/xampp/mysql/data) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

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


# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port= 3306
socket = "C:/xampp/mysql/mysql.sock"
basedir = "C:/xampp/mysql"
tmpdir = "C:/xampp/tmp"
datadir = "C:/xampp/mysql/data"
pid_file = "mysql.pid"
# enable-named-pipe
# 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

# key_buffer_size = 256M
key_buffer = 256M
max_allowed_packet = 1M
# table_open_cache = 256
table_cache = 256
sort_buffer_size = 4M
net_buffer_length = 64K
read_buffer_size = 4M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
log_error = "mysql_error.log"

# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

# Change here for bind listening
bind-address="127.0.0.1"
# bind-address = ::          # for ipv6

# Where do all the plugins live
plugin_dir = "C:/xampp/mysql/data/lib/plugin/"

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
# commented in by lampp security
#skip-networking
skip-federated

# Replication Master Server (default)
# binary logging is required for replication
# log-bin deactivated by default since XAMPP 1.4.11
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id   = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin


# Point the following paths to different dedicated disks
#tmpdir = "C:/xampp/tmp"
#log-update = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Comment the following if you are using InnoDB tables
#skip-innodb
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"
## You can set .._buffer_pool_size up to 50 - 80 %
## of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
## Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

## UTF 8 Settings
#init-connect=\'SET NAMES utf8\'
#collation_server=utf8_unicode_ci
#character_set_server=utf8
#skip-character-set-client-handshake
#character_sets-dir="C:/xampp/mysql/share/charsets"

[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 = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout


Ich habe aber irgendwie eigene Werte genommen, das entspricht (glaube ich) der Einstellung Large. Huge hat teilweise noch höhere Werte.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache stürzt ab

Postby ProxiStyx » 15. February 2013 14:08

Hilft leider auch nichts. Weder deine, noch die Huge noch eine andere, größere Konfiguration hilft.
ProxiStyx
 
Posts: 8
Joined: 14. February 2013 22:25
Operating System: Windows

Next

Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 31 guests