OVH Community, votre nouvel espace communautaire.

Besoin d'aide pour trouver la panne


tdcmystere
19/09/2008, 11h00
/var/run/mysqld/ c'est vide la dedans

jedisct1
19/09/2008, 00h00
Qu'as tu comme fichiers avec le nom "relay" dans /var/run/mysqld/ ?

tdcmystere
18/09/2008, 23h38
oui

jedisct1
18/09/2008, 17h07
Ton serveur MySQL est censé être répliqué sur un autre ?

tdcmystere
18/09/2008, 16h05
voila lo log mysql

PS Here is mysql log

080607 02:16:15 mysqld started

080607 2:16:15 [Warning] The syntax for replication startup options is deprecated and will be removed in MySQL 5.2. Please use 'CHANGE MASTER' instead.

080607 2:16:16 InnoDB: Started; log sequence number 27 146242622

080607 2:16:16 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Ple

ase use '--relay-log=/var/lib/mysql/columbusconsultbermuda-relay-bin' to avoid this problem.

080607 2:16:16 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000423' (relay_log_pos 252222175)

080607 2:16:16 [ERROR] Could not find target log during relay log initialization

080607 2:16:16 [ERROR] Failed to initialize the master info structure

080607 2:16:16 [Note] /usr/libexec/mysqld: ready for connections.

Version: '5.0.48' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

080916 19:10:36 [Note] /usr/libexec/mysqld: Normal shutdown



080916 19:10:36 InnoDB: Starting shutdown...

080916 19:10:39 InnoDB: Shutdown completed; log sequence number 27 186654710

080916 19:10:39 [Note] /usr/libexec/mysqld: Shutdown complete



080916 19:10:39 mysqld ended



080916 19:10:39 mysqld started

080916 19:10:40 [Warning] The syntax for replication startup options is deprecated and will be removed in MySQL 5.2. Please use 'CHANGE MASTER' instead.

080916 19:10:40 InnoDB: Started; log sequence number 27 186654710

080916 19:10:40 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Ple

ase use '--relay-log=/var/lib/mysql/columbusconsultbermuda-relay-bin' to avoid this problem.

080916 19:10:40 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000423' (relay_log_pos 252222175)

080916 19:10:40 [ERROR] Could not find target log during relay log initialization

080916 19:10:40 [ERROR] Failed to initialize the master info structure

080916 19:10:40 [Note] /usr/libexec/mysqld: ready for connections.

Version: '5.0.48' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

tdcmystere
17/09/2008, 08h17
ok, je les posterais un peu plus tard dans l après midi. j'ai aussi regardé au prés de mes logs apache, et j ai vus que chaque un d'eux pèse plus de 250 MB, j'espère que les logs Mysql ne pèseront pas comme ça

MasterPrenium
16/09/2008, 15h56
Effectivement ton script me fait un peu peur ... Et il nous faut effectivement ton/tes log/logs de mysql se trouvant dans :
/var/log/mysql/
tu dois avoir 3 log, mysql.err, mysql.log, mysqld.err (le dernier correspondant au daemon)

TBC_Ly0n
16/09/2008, 14h51
Les logs Mysql peuvent t'aider à trouver le problème.
Killer des processus à tour de bras est le meilleur moyen pour corrompre une base de données.

tdcmystere
15/09/2008, 23h29
je sais pas encore vous fornir le log de mon apache ni la contenance de php.in.

demain je les aurais sous les yeux



Merci a tous

tdcmystere
15/09/2008, 23h28
Everything OK on Mon Sep 15 19:26:08 CEST 2008 : httpds=96 apache_sems=8 en mysqlds=2

mysqld ping check is OK Mon Sep 15 19:26:08 CEST 2008

Everything OK on Mon Sep 15 19:26:08 CEST 2008 : httpds=96 apache_sems=8 en mysqlds=2

mysqld ping check is OK Mon Sep 15 19:28:00 CEST 2008

Everything OK on Mon Sep 15 19:28:00 CEST 2008 : httpds=99 apache_sems=8 en mysqlds=2

mysqld ping check is OK Mon Sep 15 19:31:07 CEST 2008

mysqld ping check is OK Mon Sep 15 19:31:07 CEST 2008

mysqld ping check is OK Mon Sep 15 19:31:09 CEST 2008

Everything OK on Mon Sep 15 19:31:09 CEST 2008 : httpds=73 apache_sems=8 en mysqlds=2

mysqld ping check is OK Mon Sep 15 19:31:09 CEST 2008

Everything OK on Mon Sep 15 19:31:09 CEST 2008 : httpds=73 apache_sems=8 en mysqlds=2

Damn it!!!: a restart on Mon Sep 15 19:31:11 CEST 2008

Reason: httpds=110 apache_sems=8 en mysqlds=2

Damn it!!!: a restart on Mon Sep 15 19:31:12 CEST 2008

mysqld ping check is OK Mon Sep 15 19:33:00 CEST 2008

Damn it!!!: a restart on Mon Sep 15 19:33:01 CEST 2008

Reason: httpds=1 apache_sems=0 en mysqlds=2

tdcmystere
15/09/2008, 23h28
Bonjour a tous, j ai besoin de votre avis/aide sur le probleme que j ai


j ai un site qui tourne avec une bdd +- 1go mail il arrive tres souvent que il tombe (mysql)

je n ais pas pus encore trouvé le probleme, mais resolus temporairement avec un script



#!/bin/bash

#

# This script is just a stupid script that shouldn't exist...

# Author : Alex Henneman

# Last Mod. : Sun Jul 23 09:16:05 CEST 2006



# Changes

# =======

# 1. MAX_HTTPS van 100 naar 60 verlaagd.

# 2. POLL_TIME naar een minuut verhoogd.

# 3. Loggen van het aantal apache semaphoren toegevoegd

# nog geen restart kriterium en actie erop.

# 4. Geleerd dat semaphoren een restart van apache

# overleven en semaphore cleanup in de restart ingebouwd.

# er wordt ook op getest (ik weet nog niet of het goed werkt)

# Wed Feb 23 10:18:46 MST 2005



# This scritp will only see of the maximum number # of httpd en mysqld is violated.

MAX_HTTPS=100

MIN_HTTPS=10

MAX_APACHE_SEMS=60

# Mysql processes should always be 1

MAX_MYSQLS=3



# If it happens, we do a

# /etc/init.d/httpd restart

# and spam root.



# How often to poll

POLL_TIME=300



LOG_FILE=/var/log/checkserver.log



# This is a function to see wether

# the mysql is reponding.



function ping_mysqld_working (){



MYSQL_ANSWER=$(mysqladmin --password='adm1sei' -u admin ping 2> /dev/null )



if test "$MYSQL_ANSWER" == "mysqld is alive"; then

return 1

else

return 0

fi



}







# This thing just kills any processes.

# If the arg is -k, I will kill myself!!

if test "$1" == "-k"; then

# To know my own PID id.

# PIDKILL=$(ps -A | grep lullig |grep -v grep | awk '{print $1}') ORIGINAL

PIDKILL=$(ps ax | grep checkserver |grep -v grep | awk '{print $1}')

echo "Killing script: $PIDKILL"

kill -9 $PIDKILL

exit 0

fi



# Clear the logfile

(echo "Start log van $0 om $(date)"

echo "================================================= ===================" ) > $LOG_FILE



# Start logging



while true; do





HTTP_COUNT=$(ps -A | grep httpd | wc -l)

MYSQL_COUNT=$(ps -A | grep mysqld | wc -l)

APACHE_SEM_COUNT=$(ipcs -s | grep admin | wc -l)



# ---



if ping_mysqld_working ; then



echo "*** mysqld not responding to ping $(date)" >> $LOG_FILE

#

# ----------------------------------------------------

# HERE The action to take if mysqld does not respond!!

# bijv rm -rf /*;ping -c 10000000 -f www.whitehouse.gov; shutdown -h now

# of

PID_MYSQL=$(ps -A | grep mysqld |grep -v grep | awk '{print $1}')



kill -9 $PID_MYSQL



if test $? -eq 0; then

echo "Kill of mysqld at $(date) succeeded." >> ${LOG_FILE}

else

echo "Kill of mysqld at $(date) failed." >> ${LOG_FILE}

fi



echo "Restarting mysqld" >> $LOG_FILE



/etc/init.d/mysql start



# ----------------------------------------------------

else

echo "mysqld ping check is OK $(date)" >> $LOG_FILE

fi



# ---

if test $HTTP_COUNT -gt $MAX_HTTPS || \

test $HTTP_COUNT -lt $MIN_HTTPS || \

test $MYSQL_COUNT -gt $MAX_MYSQLS || \

test $APACHE_SEM_COUNT -gt $MAX_APACHE_SEMS ; then

/etc/init.d/httpd stop

ipcs -s | grep admin | perl -e 'while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

/etc/init.d/httpd start

echo "Damn it you s6 server!!! You had to be restarted on $(date).\nReason: httpds=$HTTP_COUNT apache_sems=$APACHE_SEM_COUNT en mysqlds=$MYSQL_COUNT" | mail -s "httpd restart of s6 on $(date)" nico@klup.nl carlos@immospy.com busio@telenet.be

echo "Damn it!!!: a restart on $(date)" >> $LOG_FILE

echo "Reason: httpds=$HTTP_COUNT apache_sems=$APACHE_SEM_COUNT en mysqlds=$MYSQL_COUNT" >> $LOG_FILE

else

echo "Everything OK on $(date) : httpds=$HTTP_COUNT apache_sems=$APACHE_SEM_COUNT en mysqlds=$MYSQL_COUNT" >> $LOG_FILE

fi



sleep $POLL_TIME

done


voila par exemple le log de ce script