Jump to content

Recommended Posts

Posted

Pessoal tudo bem?

Estou com um problema em meu Roundcube. Ele está caindo em vários momentos do dia, e aparece essa mensagem abaixo

 

CENTOS 6.7 x86_64 kvm – s01 WHM 11.50.0 (build 30)

DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

Ai eu reinicio o MySql e tudo volta a funcionar corretamente.

Tentei reparar o BD e aparece essa mensagem.

roundcube.cache
note     : The storage engine for the table doesn't support repair
roundcube.cache_index
note     : The storage engine for the table doesn't support repair
roundcube.cache_messages
note     : The storage engine for the table doesn't support repair
roundcube.cache_shared

Já atualizei ele para ultima versão.

Alguém já passou por este problema?

Obrigado

 

 

 

 


Posted (edited)

Obrigado pelas respostas!

Pessoal consegui instalar o MySQLTuner, e ele mostrou os resultados abaixo!

 >>  MySQLTuner 1.6.0 - Major Hayden <major@mhtx.net>
 >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
 >>  Run with '--help' for additional options and output filtering
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.42-cll
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in MyISAM tables: 1G (Tables: 7284)
[--] Data in InnoDB tables: 46M (Tables: 288)
[!!] Total fragmented tables: 169

-------- Security Recommendations  -------------------------------------------
[OK] There is no anonymous account in all database users
[OK] All database users have passwords assigned
[!!] User 'novatabela@%' hasn't specific host restriction.
[!!] User 'novatabela@%' hasn't specific host restriction.
[!!] User 'novatabela@%' hasn't specific host restriction.
[!!] User 'novatabela@%' hasn't specific host restriction.
[!!] User 'novatabela@%' hasn't specific host restriction.
[!!] User 'novatabela@%' hasn't specific host restriction.
[--] There is 605 basic passwords in the list.

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1h 21m 11s (286K q [58.758 qps], 8K conn, TX: 9B, RX: 35M)
[--] Reads / Writes: 96% / 4%
[--] Binary logging is disabled
[--] Total buffers: 168.0M global + 2.8M per thread (151 max threads)
[OK] Maximum reached memory usage: 223.0M (5.63% of installed RAM)
[OK] Maximum possible memory usage: 583.2M (14.73% of installed RAM)
[OK] Slow queries: 0% (0/286K)
[OK] Highest usage of available connections: 13% (20/151)
[OK] Aborted connections: 0.00%  (0/8452)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (10 temp sorts / 43K sorts)
[!!] Joins performed without indexes: 667
[!!] Temporary tables created on disk: 65% (9K on disk / 14K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (400 open / 260K opened)
[OK] Open file limit used: 4% (691/17K)
[OK] Table locks acquired immediately: 99% (276K immediate / 276K locks)

-------- MyISAM Metrics -----------------------------------------------------
[!!] Key buffer used: 77.9% (6M used / 8M cache)
[OK] Key buffer size / total MyISAM indexes: 8.0M/146.7M
[OK] Read Key buffer hit rate: 99.7% (37M cached / 101K reads)
[OK] Write Key buffer hit rate: 99.6% (5M cached / 24K writes)

-------- InnoDB Metrics -----------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB buffer pool / data size: 128.0M/46.7M
[OK] InnoDB buffer pool instances: 1
[!!] InnoDB Used buffer: 41.31% (3384 used/ 8192 total)
[OK] InnoDB Read buffer efficiency: 99.27% (447815 hits/ 451116 total)
[!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
[OK] InnoDB log waits: 0.00% (0 waits / 1941 writes)

-------- AriaDB Metrics -----------------------------------------------------
[--] AriaDB is disabled.

-------- Replication Metrics -------------------------------------------------
[--] No replication slave(s) for this server.
[--] This is a standalone server..

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Restrict Host for user@% to user@SpecificDNSorIp
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Set thread_cache_size to 4 as a starting value
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
    Beware that open_files_limit (17000) variable
    should be greater than table_open_cache ( 400)
Variables to adjust:
    query_cache_size (>= 8M)
    join_buffer_size (> 128.0K, or always use indexes with joins)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    thread_cache_size (start at 4)
    table_open_cache (> 400)

 

 

Bom, provavelmente eu terei que editar o aquivo /etc/my.cnf      tentei pelo ssh e não deu ele ficou em branco!

Baixei ele pelo ftp e apareceu essas configurações.

 

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_file_per_table=1

max_allowed_packet=268435456
open_files_limit=17000
default-storage-engine=MyISAM

 

 

 

VI NO LINK INDICADO QUE O CARA COLOCOU ASSIM NO ARQUIVO!

key_buffer_size=196M 
sort_buffer=1M
join_buffer=1M
max_join_size=2M

thread_concurrency=16
thread_cache=5

table_cache=2000

interactive_timeout=45
wait_timeout=45


max_heap_table_size=128M
tmp_table_size=2G


query_cache_limit=1M
query_cache_size=512M

max_connections=500
max_user_connections=30


innodb_buffer_pool_size=128M
innodb_file_per_table=1
innodb_log_file_size=5M
innodb_thread_concurrency=4

 

 

Bom amigos, gostaria de saber:

- Se eu posso somente colar essas configurações no meu arquivo my.cnf e fazer upload dele?

- Realmente é esse o problema do roundcube estar caindo toda hora?

- O servidor usa "eu acho" somente 30% da memória ram, depois dessa configuração vou precisar comprar mais memória?

 

 

Obrigado a atenção de todos!

 

 

 

 

 

 

 

 

 

Edited by vitorcherulli
Posted (edited)

Converte para o SQLite sem medo.

/scripts/convert_roundcube_mysql2sqlite

O problema que você está enfrentando pode ser do limite de conexões simultâneas que está em 30 máximas por user mas pode ser também o que os demais citaram. O fato é que você não deve usar o RoundCube em MYSQL. Não sei quantos sites tens em seu servidor mas se forem muitos ( tipo 3 mil ou mais ), dependendo do volume de uso destes users no webmail o limite de 30 é realmente pouco. Alem disso claro, extremamente lento dependendo das demais configurações de controle de consumo de RAM e etc. Basta converter e os problemas acabam

Caso necessite ler algo, segue um bom link http://thecpaneladmin.com/roundcube-mysql-or-sqlite/

Edited by MyWay Hosting

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Do you agree with our terms?