We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Mysqld Stopping
Mysqld Stopping
Hello
Mysqld is stopping sometimes. (a time per two days)
Here is my log file
InnoDB: mmap(137363456 bytes) failed; errno 12
Is there any script to check if is stopped, start again? Or am i have to change my 512mb droplet to 1GB ram?
Is there any way to get rid of stopping?
Thank you.
Mysqld is stopping sometimes. (a time per two days)
Here is my log file
Code: Select all
140503 17:23:26 mysqld_safe Number of processes running now: 0
140503 17:23:26 mysqld_safe mysqld restarted
140503 17:23:27 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140503 17:23:29 [Note] Plugin 'FEDERATED' is disabled.
140503 17:23:29 InnoDB: The InnoDB memory heap is disabled
140503 17:23:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140503 17:23:29 InnoDB: Compressed tables use zlib 1.2.3
140503 17:23:29 InnoDB: Using Linux native AIO
140503 17:23:29 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140503 17:23:29 InnoDB: Completed initialization of buffer pool
140503 17:23:29 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140503 17:23:29 [ERROR] Plugin 'InnoDB' init function returned error.
140503 17:23:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140503 17:23:29 [ERROR] Unknown/unsupported storage engine: InnoDB
140503 17:23:29 [ERROR] Aborting
140503 17:23:29 [Note] /usr/libexec/mysqld: Shutdown complete
140503 17:23:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
#service mysqld start
140503 18:17:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140503 18:17:00 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140503 18:17:00 [Note] Plugin 'FEDERATED' is disabled.
140503 18:17:00 InnoDB: The InnoDB memory heap is disabled
140503 18:17:00 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140503 18:17:00 InnoDB: Compressed tables use zlib 1.2.3
140503 18:17:00 InnoDB: Using Linux native AIO
140503 18:17:00 InnoDB: Initializing buffer pool, size = 128.0M
140503 18:17:00 InnoDB: Completed initialization of buffer pool
140503 18:17:00 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!
140503 18:17:00 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...
140503 18:17:00 InnoDB: Waiting for the background threads to start
140503 18:17:01 InnoDB: 5.5.37 started; log sequence number 2446149
140503 18:17:01 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
140503 18:17:01 [Note] - '127.0.0.1' resolves to '127.0.0.1';
140503 18:17:01 [Note] Server socket created on IP: '127.0.0.1'.
140503 18:17:01 [Note] Event Scheduler: Loaded 0 events
140503 18:17:01 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.37' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
Is there any script to check if is stopped, start again? Or am i have to change my 512mb droplet to 1GB ram?
Is there any way to get rid of stopping?
Thank you.
Re: Mysqld Stopping
I have the same problem.
Is an image installed today from scratch.
I did an upgrade to a 1gb ram droplet and had the same result. (so no ram problem.)
How can I help to debug this?
Is an image installed today from scratch.
I did an upgrade to a 1gb ram droplet and had the same result. (so no ram problem.)
How can I help to debug this?
Re: Mysqld Stopping
check memory usage via = htop
maybe apache config not appropriate for your system (about memory usage) check apache2.conf /httpd.conf
and check "my.cnf" file for mysql config
yes there is RAM problem, because vestacp by default 'only' suitable for high machine
and don't expect admin forum will help you for this problem
google it, search solution by yourself, check this http://www.virtualmin.com/book/export/html/11764
maybe apache config not appropriate for your system (about memory usage) check apache2.conf /httpd.conf
and check "my.cnf" file for mysql config
yes there is RAM problem, because vestacp by default 'only' suitable for high machine
and don't expect admin forum will help you for this problem
google it, search solution by yourself, check this http://www.virtualmin.com/book/export/html/11764
Re: Mysqld Stopping
mysql low memory use
but is required for tuning the size of the database and the size of all indexes
send output utility mysqltuner
Code: Select all
# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=100
max_user_connections=30
wait_timeout=30
interactive_timeout=50
slow-query-log =1
long_query_time=5
#log-queries-not-using-indexes
slow-query-log-file = /var/log/mysql-slow.log
skip-external-locking
key_buffer_size = 8M
max_allowed_packet = 16M
table_open_cache = 4k
sort_buffer_size = 512k
read_buffer_size = 512k
read_rnd_buffer_size = 512k
myisam_sort_buffer_size = 8M
thread_cache_size = 128
query_cache_size = 8M
query_cache_limit = 8M
tmp_table_size = 16M
max_heap_table_size = 16M
join_buffer_size = 512k
#innodb_use_native_aio = 0
innodb_file_per_table
innodb_buffer_pool_size = 8M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
send output utility mysqltuner
Re: Mysqld Stopping
@demian
innodb_buffer_pool_size = 8M <This is too small>
at least 32M
innodb_buffer_pool_size = 8M <This is too small>
at least 32M
Re: Mysqld Stopping
if database yours site include innodb tables 8mb could be too small, if not innodb table used only roundcube 8mb - normal
Re: Mysqld Stopping
@demian
thanks a lot
you are right
thanks a lot
you are right
Re: Mysqld Stopping
I am using VestaCP with 1GB digitalocean droplet.
I've edited like this and no more problem (web finds)
I've edited like this and no more problem (web finds)
Code: Select all
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=70
max_user_connections=30
wait_timeout=10
interactive_timeout=50
long_query_time=5
slow_query_log=0
key_buffer = 128M
myisam_sort_buffer_size = 32M
join_buffer_size=1M
read_buffer_size=1M
sort_buffer_size=2M
table_cache=1536
thread_cache_size=286
interactive_timeout=25
connect_timeout=5
max_allowed_packet=32M
max_connect_errors=1000
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
tmp_table_size=64M
max_heap_table_size=64MB
bind-address= 127.0.0.1
innodb_buffer_pool_size=32M
innodb_flush_log_at_trx_commit=2
innodb_file_per_table
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
-
- Posts: 30
- Joined: Sun Nov 23, 2014 4:41 am
Re: Mysqld Stopping
ozgur wrote:I am using VestaCP with 1GB digitalocean droplet.
I've edited like this and no more problem (web finds)
Code: Select all
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql symbolic-links=0 max_connections=70 max_user_connections=30 wait_timeout=10 interactive_timeout=50 long_query_time=5 slow_query_log=0 key_buffer = 128M myisam_sort_buffer_size = 32M join_buffer_size=1M read_buffer_size=1M sort_buffer_size=2M table_cache=1536 thread_cache_size=286 interactive_timeout=25 connect_timeout=5 max_allowed_packet=32M max_connect_errors=1000 query_cache_limit=1M query_cache_size=32M query_cache_type=1 tmp_table_size=64M max_heap_table_size=64MB bind-address= 127.0.0.1 innodb_buffer_pool_size=32M innodb_flush_log_at_trx_commit=2 innodb_file_per_table [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
using this, lets see how things workout