Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

Mysqld Stopping

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
ozgur
Posts: 14
Joined: Sat Apr 26, 2014 12:45 pm

Mysqld Stopping
  • Quote

Post by ozgur » Sat May 03, 2014 3:27 pm

Hello
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
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.
Top

fedekrum
Posts: 49
Joined: Mon May 12, 2014 7:45 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Mysqld Stopping
  • Quote

Post by fedekrum » Thu May 15, 2014 9:14 pm

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?
Top

pedagang
Posts: 14
Joined: Fri Mar 14, 2014 2:01 pm

Re: Mysqld Stopping
  • Quote

Post by pedagang » Fri May 16, 2014 1:45 am

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
Top

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: Mysqld Stopping
  • Quote

Post by demian » Fri May 16, 2014 11:18 am

mysql low memory use

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
but is required for tuning the size of the database and the size of all indexes

send output utility mysqltuner
Top

pedagang
Posts: 14
Joined: Fri Mar 14, 2014 2:01 pm

Re: Mysqld Stopping
  • Quote

Post by pedagang » Fri May 16, 2014 2:45 pm

@demian
innodb_buffer_pool_size = 8M <This is too small>
at least 32M
Top

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: Mysqld Stopping
  • Quote

Post by demian » Fri May 16, 2014 3:48 pm

if database yours site include innodb tables 8mb could be too small, if not innodb table used only roundcube 8mb - normal
Top

pedagang
Posts: 14
Joined: Fri Mar 14, 2014 2:01 pm

Re: Mysqld Stopping
  • Quote

Post by pedagang » Fri May 16, 2014 4:55 pm

@demian
thanks a lot
you are right
Top

ozgur
Posts: 14
Joined: Sat Apr 26, 2014 12:45 pm

Re: Mysqld Stopping
  • Quote

Post by ozgur » Mon May 19, 2014 6:43 pm

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


Top

iamkingsleyf
Posts: 30
Joined: Sun Nov 23, 2014 4:41 am

Re: Mysqld Stopping
  • Quote

Post by iamkingsleyf » Fri Jan 02, 2015 7:02 pm

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
Top


Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password