Aller au contenu

Torlax

Actif
  • Compteur de contenus

    17
  • Inscrit(e) le

  • Dernière visite

Messages postés par Torlax

  1. Bonjour à tous !



    Bon, j'ai une question que peut être certains d'entre vous se sont déjà posé...



    Il se trouve que je manipule depuis longtemps ESX, d'ailleurs toutes mes infra sont virtualisées... Comme chacun le sait, les avantages sont énormes à tous point de vue.



    Par contre cela fait un petit moment que je me pose une question, et mes multiples recherches dans le domaine ne m’ont apportés aucunes réponses valable... Plusieurs prestataire proposent des offre "Private Cloud" (comme OVH par exemple, mais aucuns ne propose ce type de service... d'ailleurs je trouve la définition du "Cloud" particulièrement nébuleuse...) bon, je sais qu'on peu partir sur du Load balancing, de la HA, etc... mais :



    Est-il possible de mutualiser les ressources de plusieurs hôtes (de manière privé) pour envoyer la "purée" que sur une seule VM ?



    Exemple :



    J'ai mon Vsphere Server avec 4 hôtes dedans qui disposent chacun d'un CPU de 2GHz, et de 2 Go de ram... Est ce qu'une des licence de type "vCloud" permet par exemple de créer un pool de ressources émanant de mes 4 hôtes et de créer une seule et unique VM, puis de lui allouer 4x2Ghz et 4x2 Go de ram ?



    Je sais qu'on peu faire des clusters sous Linux, mais bon... ça serais pas mal un truc du genre sous Vmware !


  2. Bonjour a tous !

    Stéphane, 32 ans, informaticien depuis plus de 10 ans (je sais, ca englobe beaucoup de choses, mais c'est parce que c'est réellement le cas pour ma part, en effet, nous touchons réellement a tout...) dans une boite privé.

    Nous bossons exclusivement pour des clients professionnels (hôpitaux, mairies, gros bahuts, cabinets avocats/comptables,archis).

    Je suis webmaster et web-designer a mes heures perdu, et en particulier pour l'un des plus gros site francophone de vidéos insolite :-)

    Voila voila, content de me joindre a vous ! :-)

  3. Non, je suis sur de moi pour le coup smile.gif



    Voilà ma config brut de fonderie à l'instant même :




    [mysqld]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock
    bind-address = xxx.xxx.xxx.xxx

    skip-external-locking
    max_connections = 500
    key_buffer_size = 10G
    max_allowed_packet = 1M
    table_open_cache = 4
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 128K
    table_cache = 2048
    query_cache_limit = 30M
    query_cache_size = 128M
    thread_cache_size = 20
    max_heap_table_size = 128M

    #skip-networking
    server-id = 1

    # Uncomment the following if you want to log updates
    #log-bin=mysql-bin

    log_error = /var/log/mysql/error.log
    log-slow-queries = /var/log/mysql/slowww.log
    long_query_time = 1
    log-queries-not-using-indexes

    # binary logging format - mixed recommended
    #binlog_format=mixed

    # Causes updates to non-transactional engines using statement format to be
    # written directly to binary log. Before using this option make sure that
    # there are no dependencies between transactional and non-transactional
    # tables such as in the statement INSERT INTO t_myisam SELECT * FROM
    # t_innodb; otherwise, slaves may diverge from the master.
    #binlog_direct_non_transactional_updates=TRUE

    # Uncomment the following if you are using InnoDB tables

    # (using the "enable-named-pipe" option) will render mysqld useless!
    #
    #skip-networking
    server-id = 1

    # Uncomment the following if you want to log updates
    #log-bin=mysql-bin

    log_error = /var/log/mysql/error.log
    log-slow-queries = /var/log/mysql/slowww.log
    long_query_time = 1
    log-queries-not-using-indexes

    # binary logging format - mixed recommended
    #binlog_format=mixed

    # Causes updates to non-transactional engines using statement format to be
    # written directly to binary log. Before using this option make sure that
    # there are no dependencies between transactional and non-transactional
    # tables such as in the statement INSERT INTO t_myisam SELECT * FROM
    # t_innodb; otherwise, slaves may diverge from the master.
    #binlog_direct_non_transactional_updates=TRUE


    innodb_data_home_dir = /var/lib/mysql
    innodb_data_file_path = ibdata1:50M:autoextend
    innodb_log_group_home_dir = /var/lib/mysql
    innodb_buffer_pool_size = 20G
    innodb_additional_mem_pool_size = 32M
    innodb_file_per_table
    innodb_flush_method = O_DIRECT
    innodb_file_format = barracuda
    innodb_log_file_size = 256M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_lock_wait_timeout = 50

    [mysqldump]
    quick
    max_allowed_packet = 16M

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

    [myisamchk]
    key_buffer_size = 8M
    sort_buffer_size = 8M

    [mysqlhotcopy]
    interactive-timeout


    On dirais qu'il prend les valeurs par défaut... Aurais-je fait une erreur de placement dans ma config ? J’apprécie bcp ton aide en tout cas !


  4. Mon log de démarrage Innodb :




    130401 21:03:19 mysqld_safe mysqld from pid file /var/lib/mysql/Srvxxxxxx.pid ended
    130401 21:04:45 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130401 21:04:45 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-que$
    130401 21:04:46 [Note] Plugin 'FEDERATED' is disabled.
    130401 21:04:46 InnoDB: The InnoDB memory heap is disabled
    130401 21:04:46 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130401 21:04:46 InnoDB: Compressed tables use zlib 1.2.3.4
    130401 21:04:46 InnoDB: Using Linux native AIO
    130401 21:04:46 InnoDB: Initializing buffer pool, size = 128.0M
    130401 21:04:46 InnoDB: Completed initialization of buffer pool
    130401 21:04:46 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    130401 21:04:46 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait...
    130401 21:04:46 InnoDB: highest supported file format is Barracuda.
    InnoDB: The log sequence number in ibdata files does not match
    InnoDB: the log sequence number in the ib_logfiles!
    130401 21:04:46 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    130401 21:04:46 InnoDB: Waiting for the background threads to start
    130401 21:04:47 InnoDB: 5.5.30 started; log sequence number 2170520588
    130401 21:04:47 [Note] Server hostname (bind-address): 'xxx.xxx.xxx.xxx'; port: 3306
    130401 21:04:47 [Note] Server socket created on IP: 'xxx.xxx.xxx.xxx'.
    130401 21:04:47 [Note] Event Scheduler: Loaded 0 events
    130401 21:04:47 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.5.30-1~dotdeb.0-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)

  5. Aucunes. Je n'est rien dans les logs a part le démarrage du moteur de base de données et l'initialisation des buffers. Et dans le slow.log j'ai les mêmes log de requêtes qui n'utilisent pas d'index que dans mon post plus haut. Tout a tres bien fonctionné jusqu'à 2000/2500 visiteurs puis plantage. Mysql était complètement planté, même pas possible de l'arrêter. Et côté Apache php, les requêtes se sont empilées et le load average c'est envollé, sans pour autant s'effondrer.

  6. En 20 minutes buffer explosé oui je pense, et empilement de Task coté Apache/Php, j'ai tout repassé en Myisam pour temporiser...



    Quand ça pète, impossible d'arreter proprement Mysql, ça part direct en "Failed". Rien dans error.log...



    Screen de mon "planton" coté Google Analytics, hécatombe difficile de faire des test en prod sad.gif :



    1179510107.jpg


  7. Et voilà, migration faite smartass.gif :



    Tout tourne en ce moment même avec ça (grand merci Kioob, et très intéressant ton article) :




    innodb_data_home_dir = /var/lib/mysql
    innodb_data_file_path = ibdata1:10M:autoextend
    innodb_log_group_home_dir = /var/lib/mysql
    innodb_buffer_pool_size = 20G
    innodb_additional_mem_pool_size = 32M
    innodb_file_per_table
    innodb_flush_method = O_DIRECT
    innodb_file_format = barracuda
    innodb_log_file_size = 256M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_lock_wait_timeout = 50

    On fait des tests de monté de charge là... voir comment ça se comporte...



    Edit : Bon... ça ne tiens pas... à 3000 connexions Mysql s'éffondre, j'insiste bien, c'est Mysql qui pète sick.gif


  8. innodb_log_file_size ne doit pas faire au moins 20% de la valeur du pool_size ? Ensuite, si je comprends bien, c'est le logfile0 et logfile1 que je déplace une fois mysql arrêté proprement ?

    Par contre, si je passe toutes mes tables (wordpress et IPB donc) en innodb c'est pas contre-productif si je perds mes index fulltext ?

    innodb_file_per_table et innodb_file_format = barracuda seront pris en compte sur les bases existantes ou j'ai des manips à faire ?


    Je vais faire un autre essai ce soir... En prenant soins de faire un full backup avant :-D

  9. J'ai déjà essayé de le faire, en le configurant comme ceci :




    innodb_data_home_dir = /var/lib/mysql
    innodb_data_file_path = ibdata1:50M:autoextend
    innodb_log_group_home_dir = /var/lib/mysql
    innodb_buffer_pool_size = 20G
    innodb_additional_mem_pool_size = 32M
    innodb_log_file_size = 5G
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 1
    innodb_lock_wait_timeout = 50



    Avec cette config, Mysql ne démarrais plus du tout... (fameux ".....Failed")



    J'ai alors essayé de réduire : "innodb_log_file_size = 5G" à 3G et "innodb_log_buffer_size = 8M" à 1M



    Là ça à démarré, et curieusement, ça n'était pas stable du tout (fracassage toutes les 5 minutes)... Mais en effet je n'avais plus aucuns lock de table


  10. Bon, je viens aux nouvelles happy.gif



    Il se trouve que je n'ai aucunes requêtes qui prennent plus d'une seconde à s’exécuter a_thumbsup_20.gif



    Par contre, j'ai pas mal de requêtes qui n'utilisent pas (ou mal) les index, petit exemple :




    # Time: 130330 19:15:14
    # User@Host: X[X] @ [xxx.xxx.xxx.xxx]
    # Query_time: 0.000218 Lock_time: 0.000016 Rows_sent: 0 Rows_examined: 1
    SET timestamp=1364667314;
    DELETE FROM ipb_sessions WHERE ip_address='xxx.xxx.xxx.xxx' OR id='google=xx3xxcxxxxbb60xx8xx6xx2x6c82xxx_session';
    # Time: 130330 19:15:39
    # User@Host: X[X] @ [xxx.xxx.xxx.xxx]
    # Query_time: 0.000534 Lock_time: 0.000033 Rows_sent: 28 Rows_examined: 56
    SET timestamp=1364667339;
    SELECT f.*,p.* FROM ipb_forums f LEFT JOIN ipb_permission_index p ON ( p.perm_type='forum' AND p.app='forums' AND p.per$
    # User@Host: X[X] @ [xxx.xxx.xxx.xxx]
    # Query_time: 0.000185 Lock_time: 0.000033 Rows_sent: 19 Rows_examined: 63
    SET timestamp=1364667339;
    SELECT s.id, s.member_id, s.member_name, s.seo_name, s.login_type, s.running_time, s.member_group, s.uagent_type,pp.cns_$
    # Time: 130330 19:15:57
    # User@Host: X[X] @ [xxx.xxx.xxx.xxx]
    # Query_time: 0.000172 Lock_time: 0.000017 Rows_sent: 0 Rows_examined: 1
    SET timestamp=1364667357;
    DELETE FROM ipb_sessions WHERE ip_address='xxx.xxx.xxx.xxx' OR id='google=xx3xxcxxxxbb60xx8xx6xx2x6c82xxx_session';


    Edit :



    ./tuning-primer.sh me dit que j'ai 8590 requête qui ont mis plus d'une seconde à s’exécuter, par contre je ne les voient pas dans mon "slow.log"...




    SLOW QUERIES
    The slow query log is enabled.
    Current long_query_time = 1.000000 sec.
    You have 8590 out of 7684513 that take longer than 1.000000 sec. to complete
    Your long_query_time seems to be fine
  11. Merci pour vos réponses :-) N'y connaissant que le strict minimum a la structure que peut avoir une base SQL, la méthode pour trouver ou se trouve les jointures me semble vachement nébuleuse... En fait c'est pas de faire qui me gêne, loin de là, en ce moment je passe des nuits complète à optimiser... C'est plutôt de ne pas connaitre comment est structuré réellement une base, ça m'handicape dans mon élan...


  12. Bonjour à tous ! happy.gif



    Etant totalement désespéré, je m'adresse à vous en dernier recours smartass.gif



    Je vous retrace l'historique de mon problème :



    Je m'occupe actuellement d'un site avec un nombre de connexion plutot énorme (150 000 à 300 000 visiteurs par jours en moyenne). Le site en question est un bon gros Wordpress (9 plugins actif, plugins plutôt propre parmi les plus connu) avec une base sql pesant 380 Mo et environs 9000 articles, ainsi qu'un forum IPB don la base sql pèse 150 Mo... Auparavant, nous avions un gros HG XXL chez ovh pour gérer le tout. J'avais monté un ESX avec ma VM dessus qui comprenais Apache, php5, Mysql, bref... Après optimisation, on arrivais à grimper à environs 4000/4500 connexions simultanés (via Google Analytics) avec un Load Average assez élevé... J'ai donc fait le choix de partir sur deux serveur MG SSD plus petit (mono Xeon, 64 Go de ram sur les deux), le tout avec un Vrack (Baie Virtuelle), un bloc RIPE, et j'ai connecté mes deux serveur en "privé". Sur le premier (le frontal) J'y ai mis Apache + PHP et sur le seconds, mon Mysql. En gros j'ai réparti la charge sur deux serveur quoi... Après optimisation, j'obtiens à peu prêt la même tolérance à la charge qu'auparavant, mais avec des temps de réponses plutot rapide. Le souci, c'est que pendant les pic d'audience, ça se vautre méchamment...



    Constatations actuelles :



    - Mes logs apache ne me remonte aucunement la fameuse alerte comme quoi j'aurais atteins "Max_connection" (réglé sur 1024 actuellement).


    - Mes logs Mysql ne me remonte aucunement "Too many connections"


    - J'utilise bien un Opcode, ici APC (avec valeur 2Go de cache)


    - Coté Wordpress, W3 Total Cache paramétré


    - Cloudflare actif pour décharger apache de toute la partie "statique"



    En fait, quand ça pète, ça donne réellement l'impression que Apache suit correctement, Mysql sature, il tombe... les requête s'empilent et font ensuite pétés apache + php.



    J'en viens à ma demande... La partie ou je m'y connais le moins bien est Mysql (comme beaucoup...) Et je suspecte beaucoup d'avoir une base non optimisé (manque d'index, problème de jointures etc...) en plus de (peut être) quelques script foireux. Pour les scripts foireux, nous y travaillons : Nous allons faire développer notre propre thème, avec tout ce que nous avons besoin en plugin directement intégré pour décharger Wordpress.



    Là ou je bute, c'est l'optimisation de ma base Mysql... Les index, etc... Je ne sais pas dutout par ou commencer. J'ai également essayé de passé toutes mes table en Innodb pour éviter les lock au niveau des tables, ça s'écroule encore plus vite qu'en Myisam, en ayant pourtant pris soin de ne pas faire de réglages foireux (Pool_Buffer_Size à 50/80% de ma ram, etc...). J'ai également essayé "Apache + Varnish", "Nginx + Varnish", "Apache + Nginx en reverse proxy", malgré tout ça, rien à faire ça fini toujours par explosé quasiment dans les mêmes circonstances.



    Si une bonne âme se sent de me conseiller sur ce que je devrais faire, m'aiguiller ou carrément me proposer un audit, je suis preneur... Enfin, je vous met mes fichiers de config actuel ci-dessous :



    Merci à tous !




    My.ini :



    [mysqld]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock
    bind-address = xxx.xxx.xxx.xxx

    skip-external-locking
    max_connections = 500
    key_buffer_size = 10G
    max_allowed_packet = 1M
    table_open_cache = 4
    sort_buffer_size = 64K
    read_buffer_size = 256K
    read_rnd_buffer_size = 256K
    net_buffer_length = 2K
    thread_stack = 128K
    table_cache = 2048
    query_cache_limit = 30M
    query_cache_size = 128M #(J'attends les 48h de Tuning-primer ici pour augmenter cette valeur)
    thread_cache_size = 20
    max_heap_table_size = 128M #(J'attends les 48h de Tuning-primer ici pour augmenter cette valeur)


    [mysqldump]
    quick
    max_allowed_packet = 16M

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

    [myisamchk]
    key_buffer_size = 8M
    sort_buffer_size = 8M

    [mysqlhotcopy]
    interactive-timeout




    Apache.conf :




    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 200
    KeepAliveTimeout 2
    HostnameLookups Off

    <IfModule mpm_prefork_module>
    StartServers 64
    MinSpareServers 64
    MaxSpareServers 128
    ServerLimit 1500
    MaxClients 1500
    MaxRequestsPerChild 300
    </IfModule>



    Résultat TuningPrimer (ça ne fait pas 48h là, donc ne veut pas dire grand chose mais j'vous le met quand meme...) :




    MySQL Version 5.5.30-1~dotdeb.0 x86_64

    Uptime = 0 days 12 hrs 50 min 46 sec
    Avg. qps = 124
    Total Questions = 5735385
    Threads Connected = 3

    Warning: Server has not been running for at least 48hrs.
    It may not be safe to use these recommendations

    To find out more information on how each of these
    runtime variables effects performance visit:
    http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
    Visit http://www.mysql.com/products/enterprise/advisors.html
    for info about MySQL's Enterprise Monitoring and Advisory Service

    SLOW QUERIES
    The slow query log is NOT enabled.
    Current long_query_time = 10.000000 sec.
    You have 0 out of 5735409 that take longer than 10.000000 sec. to complete
    Your long_query_time seems to be fine

    BINARY UPDATE LOG
    The binary update log is NOT enabled.
    You will not be able to do point in time recovery
    See http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html

    WORKER THREADS
    Current thread_cache_size = 20
    Current threads_cached = 17
    Current threads_per_sec = 0
    Historic threads_per_sec = 0
    Your thread_cache_size is fine

    MAX CONNECTIONS
    Current max_connections = 500
    Current threads_connected = 4
    Historic max_used_connections = 39
    The number of used connections is 7% of the configured maximum.
    You are using less than 10% of your configured max_connections.
    Lowering max_connections could help to avoid an over-allocation of memory
    See "MEMORY USAGE" section to make sure you are not over-allocating

    INNODB STATUS
    Current InnoDB index space = 0 bytes
    Current InnoDB data space = 0 bytes
    Current InnoDB buffer pool free = 98 %
    Current innodb_buffer_pool_size = 128 M
    Depending on how much space your innodb indexes take up it may be safe
    to increase this value to up to 2 / 3 of total system memory

    MEMORY USAGE
    Max Memory Ever Allocated : 10.29 G
    Configured Max Per-thread Buffers : 406 M
    Configured Max Global Buffers : 10.26 G
    Configured Max Memory Limit : 10.66 G
    Physical Memory : 39.38 G
    Max memory limit seem to be within acceptable norms

    KEY BUFFER
    Current MyISAM index space = 88 M
    Current key_buffer_size = 10.00 G
    Key cache miss rate is 1 : 660
    Key buffer free ratio = 80 %
    Your key_buffer_size seems to be fine

    QUERY CACHE
    Query cache is enabled
    Current query_cache_size = 128 M
    Current query_cache_used = 43 M
    Current query_cache_limit = 30 M
    Current Query cache Memory fill ratio = 34.20 %
    Current query_cache_min_res_unit = 4 K
    MySQL won't cache query results that are larger than query_cache_limit in size

    SORT OPERATIONS
    Current sort_buffer_size = 64 K
    Current read_rnd_buffer_size = 256 K
    Sort buffer seems to be fine

    JOINS
    Current join_buffer_size = 132.00 K
    You have had 2 queries where a join could not use an index properly
    You should enable "log-queries-not-using-indexes"
    Then look for non indexed joins in the slow query log.
    If you are unable to optimize your queries you may want to increase your
    join_buffer_size to accommodate larger joins in one pass.

    Note! This script will still suggest raising the join_buffer_size when
    ANY joins not using indexes are found.

    OPEN FILES LIMIT
    Current open_files_limit = 65536 files
    The open_files_limit should typically be set to at least 2x-3x
    that of table_cache if you have heavy MyISAM usage.
    Your open_files_limit value seems to be fine

    TABLE CACHE
    Current table_open_cache = 2048 tables
    Current table_definition_cache = 400 tables
    You have a total of 253 tables
    You have 311 open tables.
    The table_cache value seems to be fine

    TEMP TABLES
    Current max_heap_table_size = 128 M
    Current tmp_table_size = 16 M
    Of 65393 temp tables, 38% were created on disk
    Perhaps you should increase your tmp_table_size and/or max_heap_table_size
    to reduce the number of disk-based temporary tables
    Note! BLOB and TEXT columns are not allow in memory tables.
    If you are using these columns raising these values might not impact your
    ratio of on disk temp tables.

    TABLE SCANS
    Current read_buffer_size = 256 K
    Current table scan ratio = 388 : 1
    read_buffer_size seems to be fine

    TABLE LOCKING
    Current Lock Wait ratio = 1 : 21
    You may benefit from selective use of InnoDB.
    If you have long running SELECT's against MyISAM tables and perform
    frequent updates consider setting 'low_priority_updates=1'
    If you have a high concurrency of inserts on Dynamic row-length tables
    consider setting 'concurrent_insert=ALWAYS'.

  13. Bonjour à tous :cool:

    Je viens à vous car je suspecte un bug avec la toute derniere mise à jour mysql sous Linux... Je vous explique :

    Nous disposons d'un serveur dédié assez baraqué (bi-xeon, 24 Go de ram...) sur lequel j'ai plaqué une Debian (v6)...

    Le site étant très gros (64 Go sur le FTP, base sql de 150 Mo, le tout sous Wordpress) j'ai gérer le truc comme ceci :

    - Mysql pour la base SQL donc...

    - Apache pour le traitement des requetes

    - Nginx pour les statics

    Le principe était que tout ce qui est static (images, etc...) est traité par Nginx, tous le reste est relayé à Apache. Tout fonctionne très bien, tout est très fluide et surtout, tout était stable. D'autant plus que nous avons grosso-modo 900 à 1500 visiteurs unique par heures.

    Et là, c'est le drame :

    Après un bel "apt-get update" + "apt-get upgrade" sur mon beau debian, nouvelle version de Mysql... Et la, PAFFFF... Des erreurs mysql (erreurs d'accès à la base de donneé) en pagaille !!! Aléatoirement ! (il peut y avoir juste 600 visiteurs quand celà se produit, ou 1500) L'erreur n'est pas obligatoire à partir de "tant" de visiteurs quoi.

    Les vérifications que j'ai faites sont les suivantes :

    - vérification de l'espace disque disponible sur mes partitions : là, je suis tranquille, je dispose de 2 To d'espace libre...

    - vérification de ma config Apache.conf, Nginx.conf et mysql (fichier my.cf) : là, rien à bouger, tout est comme avant la mise à jour debian, les valeurs sont les même (je vous mettrais la copie de la config de ses fichiers plus bas)

    - J'ai désactiver pas mal de plugins wordpress bouffeur de requetes sql... même problème... ça à rien résolu.

    Bref, tout ça pour dire qu'avant la mise à jour Debian, tout allais bien, serveur solide etc... Et après la mise à jour Debian (mysql etc...) ça foire grave alors que ma config n'a pas l'air d'avoir bouger d'un poil...

    Voici ma config (pas parfaite je suppose, mais qui m'allais bien) de mes différents fichier vitaux :

    Mon fichier My.cf :


    #
    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html

    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock

    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram

    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket = /var/run/mysqld/mysqld.sock
    nice = 0

    [mysqld]
    #
    # * Basic Settings
    #
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    language = /usr/share/mysql/english
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address = 127.0.0.1
    #
    # * Fine Tuning
    #
    key_buffer = 16M
    max_allowed_packet = 16M
    thread_stack = 192K
    thread_cache_size = 8
    # This replaces the startup script and checks MyISAM tables if needed
    # the first time they are touched
    myisam-recover = BACKUP
    max_connections = 256
    table_cache = 512
    #thread_concurrency = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit = 1M
    query_cache_size = 32M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file = /var/log/mysql/mysql.log
    #general_log = 1
    #
    # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
    #
    # Here you can see queries with especially long duration
    log_slow_queries = /var/log/mysql/mysql-slow.log
    #long_query_time = 2
    #log-queries-not-using-indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # other settings you may need to change.
    #server-id = 1
    #log_bin = /var/log/mysql/mysql-bin.log
    expire_logs_days = 10
    max_binlog_size = 100M
    #binlog_do_db = include_database_name
    #binlog_ignore_db = include_database_name
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    # ssl-ca=/etc/mysql/cacert.pem
    # ssl-cert=/etc/mysql/server-cert.pem
    # ssl-key=/etc/mysql/server-key.pem



    [mysqldump]
    quick
    quote-names
    max_allowed_packet = 16M

    [mysql]
    #no-auto-rehash # faster start of mysql but no tab completition

    [isamchk]
    key_buffer = 16M

    #
    # * IMPORTANT: Additional settings that can override those from this file!
    # The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/
    log-slow-queries = /var/log/mysql/mysql-slow.log
    long_query_time = 1

    Mon fichier Apache.conf :


    #
    # Based upon the NCSA server configuration files originally by Rob McCool.
    #
    # This is the main Apache server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See http://httpd.apache.org/docs/2.2/ for detailed information about
    # the directives.
    #
    # 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.
    #
    # The configuration directives are grouped into three basic sections:
    # 1. Directives that control the operation of the Apache server process as a
    # whole (the 'global environment').
    # 2. Directives that define the parameters of the 'main' or 'default' server,
    # which responds to requests that aren't handled by a virtual host.
    # These directives also provide default values for the settings
    # of all virtual hosts.
    # 3. Settings for virtual hosts, which allow Web requests to be sent to
    # different IP addresses or hostnames and have them handled by the
    # same Apache server process.
    #
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path. If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "foo.log"
    # with ServerRoot set to "/etc/apache2" will be interpreted by the
    # server as "/etc/apache2/foo.log".
    #

    ### Section 1: Global Environment
    #
    # The directives in this section affect the overall operation of Apache,
    # such as the number of concurrent requests it can handle or where it
    # can find its configuration files.
    #

    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # NOTE! If you intend to place this on an NFS (or otherwise network)
    # mounted filesystem then please read the LockFile documentation (available
    # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
    # you will save yourself a lot of trouble.
    #
    # Do NOT add a slash at the end of the directory path.
    #
    #ServerRoot "/etc/apache2"
    ServerName localhost

    #
    # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
    #
    LockFile ${APACHE_LOCK_DIR}/accept.lock

    #
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    # This needs to be set in /etc/apache2/envvars
    #
    PidFile ${APACHE_PID_FILE}

    #
    # Timeout: The number of seconds before receives and sends time out.
    #
    Timeout 300

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

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

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

    # prefork MPM
    # StartServers: number of server processes to start
    # MinSpareServers: minimum number of server processes which are kept spare
    # MaxSpareServers: maximum number of server processes which are kept spare
    # MaxClients: maximum number of server processes allowed to start
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule mpm_prefork_module>
    StartServers 64
    MinSpareServers 128
    MaxSpareServers 256
    ServerLimit 512
    MaxClients 512
    MaxRequestsPerChild 65536
    </IfModule>

    # worker MPM
    # StartServers: initial number of server processes to start
    # MaxClients: maximum number of simultaneous client connections
    # MinSpareThreads: minimum number of worker threads which are kept spare
    # MaxSpareThreads: maximum number of worker threads which are kept spare
    # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
    # graceful restart. ThreadLimit can only be changed by stopping
    # and starting Apache.
    # ThreadsPerChild: constant number of worker threads in each server process
    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule mpm_worker_module>
    StartServers 2
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadLimit 64
    ThreadsPerChild 25
    MaxClients 150
    MaxRequestsPerChild 0
    </IfModule>

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

    # These need to be set in /etc/apache2/envvars
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}

    #
    # AccessFileName: The name of the file to look for in each directory
    # for additional configuration directives. See also the AllowOverride
    # directive.
    #

    AccessFileName .htaccess

    #
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    #
    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
    </Files>

    #
    # DefaultType is the default MIME type the server will use for a document
    # if it cannot otherwise determine one, such as from filename extensions.
    # If your server contains mostly text or HTML documents, "text/plain" is
    # a good value. If most of your content is binary, such as applications
    # or images, you may want to use "application/octet-stream" instead to
    # keep browsers from trying to display binary files as though they are
    # text.
    #
    DefaultType text/plain


    #
    # HostnameLookups: Log the names of clients or just their IP addresses
    # e.g., www.apache.org (on) or 204.62.129.132 (off).
    # The default is off because it'd be overall better for the net if people
    # had to knowingly turn this feature on, since enabling it means that
    # each client request will result in AT LEAST one lookup request to the
    # nameserver.
    #
    HostnameLookups Off

    # 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 ${APACHE_LOG_DIR}/error.log

    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel warn

    # Include module configuration:
    Include mods-enabled/*.load
    Include mods-enabled/*.conf

    # Include all the user configurations:
    Include httpd.conf

    # Include ports listing
    Include ports.conf

    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
    #
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent

    # Include of directories ignores editors' and dpkg's backup files,
    # see README.Debian for details.

    # Include generic snippets of statements
    Include conf.d/

    # Include the virtual host configurations:
    Include sites-enabled/

    # Sécurisation du fichier de configuration de phpMyAdmin:
    <Files config.inc.php>
    Order allow,deny
    Deny from all
    </Files>

    Merci à tous pour votre aide ! :smartass:

×
×
  • Créer...