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.
try to detect crash reasons server/mysql?
try to detect crash reasons server/mysql?
first of all: i am very happy with vesta cp.
it's simple, it's compact, it "feels" save :) (russian hackers are the best, ain't they :)
i try to detect what is causing mysql to crash frequently... like every 2 days.
server is vps@hetzner with 512MB of RAM running Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u1 i686 GNU/Linux
okay the server probably has a little bit to less ram?
or is it the harddisk space that it runs out because of backups using too much space?
you can clearly see the whole thing/mysql? has stopped exactly at 21:00 yesterday :-D
does not show anything
can that be?
thx in advance
it's simple, it's compact, it "feels" save :) (russian hackers are the best, ain't they :)
i try to detect what is causing mysql to crash frequently... like every 2 days.
server is vps@hetzner with 512MB of RAM running Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u1 i686 GNU/Linux
okay the server probably has a little bit to less ram?
or is it the harddisk space that it runs out because of backups using too much space?
Code: Select all
# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 13G 5.5G 70% /
# free -m
total used free shared buffers cached
Mem: 502 492 9 0 11 137
-/+ buffers/cache: 343 158
Swap: 0 0 0
you can clearly see the whole thing/mysql? has stopped exactly at 21:00 yesterday :-D
Code: Select all
vim /var/log/dmesg
Code: Select all
vim /var/log/syslog
May 28 10:17:11 domain mysqld_safe[3623]: /usr/bin/mysqladmin -u root password 'new-password'
May 28 10:17:11 domain mysqld_safe[3623]: /usr/bin/mysqladmin -u root -h password 'new-password'
thx in advance
Last edited by canoodle on Thu May 28, 2015 11:16 am, edited 2 times in total.
Re: try to detect crash reasons server/mysql?
is this of any use
mysql/error.log
mysql/error.log
Code: Select all
150528 10:17:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150528 10:17:19 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0+deb7u1) starting as process 4095 ...
150528 10:17:19 [Note] Plugin 'FEDERATED' is disabled.
150528 10:17:19 InnoDB: The InnoDB memory heap is disabled
150528 10:17:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150528 10:17:19 InnoDB: Compressed tables use zlib 1.2.7
150528 10:17:19 InnoDB: Using Linux native AIO
150528 10:17:19 InnoDB: Initializing buffer pool, size = 128.0M
150528 10:17:19 InnoDB: Completed initialization of buffer pool
150528 10:17:19 InnoDB: highest supported file format is Barracuda.
150528 10:17:19 InnoDB: Waiting for the background threads to start
150528 10:17:20 InnoDB: 5.5.43 started; log sequence number 717962383
150528 10:17:20 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150528 10:17:20 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150528 10:17:20 [Note] Server socket created on IP: '0.0.0.0'.
150528 10:17:20 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 10:17:20 [Note] Event Scheduler: Loaded 0 events
150528 10:17:20 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0+deb7u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
Status information:
Current dir: /var/lib/mysql/
Running threads: 1 Stack size: 196608
Current locks:
lock: 0xb8cfe570:
lock: 0xb8d02df8:
lock: 0xb8d02ca8:
lock: 0xb8cf9b98:
lock: 0xb8cfa038:
lock: 0xb8ceefc8:
lock: 0xb8cef698:
lock: 0xb8ce5b40:
lock: 0xb8cd88a0:
lock: 0xb8cdfba8:
lock: 0xb8cd5c40:
lock: 0xb8925c68:
lock: 0xb8924c08:
lock: 0xb89265f8:
lock: 0xb890f488:
lock: 0xb890b188:
lock: 0xb8c9ea68:
lock: 0xb8c9ef08:
lock: 0xb8cb1c30:
lock: 0xb8a08bd0:
lock: 0xb892ce90:
lock: 0xb8c936d0:
lock: 0xb88e79b0:
lock: 0xb88bc9c8:
lock: 0xb88b2c38:
lock: 0xb887ad98:
lock: 0xb8870860:
lock: 0xb8890248:
lock: 0xb888ba08:
lock: 0xb8886d90:
lock: 0xb887ff68:
lock: 0xb7855080:
lock: 0xb7855500:
lock: 0xb7855480:
lock: 0xb7855400:
lock: 0xb7855180:
lock: 0xb7855100:
lock: 0xb7855000:
lock: 0xb7854f80:
lock: 0xb7854f00:
lock: 0xb7855580:
lock: 0xb7855200:
lock: 0xb7855380:
lock: 0xb7855300:
lock: 0xb7855280:
lock: 0xb7854e80:
lock: 0xb7854e00:
lock: 0xb7854d80:
Key caches:
default
Buffer_size: 8388608
Block_size: 1024
Division_limit: 100
Age_limit: 300
blocks used: 0
not flushed: 0
w_requests: 0
writes: 0
r_requests: 0
reads: 0
handler status:
read_key: 0
read_next: 0
read_rnd 0
read_first: 4
write: 3960
delete 0
update: 0
Table status:
Opened tables: 53
Open tables: 46
Open files: 24
Open streams: 0
Alarm status:
Active alarms: 0
Max used alarms: 0
Next alarm time: 0
150528 10:17:21 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
Memory status:
Non-mmapped space allocated from system: 11358208
Number of free chunks: 16
Number of fastbin blocks: 0
Number of mmapped regions: 14
Space in mmapped regions: 23085056
Maximum total allocated space: 0
Space available in freed fastbin blocks: 0
Total allocated space: 11170408
Total free space: 187800
Top-most, releasable space: 167888
Estimated memory (with thread stack): 34639872
Events status:
LLA = Last Locked At LUA = Last Unlocked At
WOC = Waiting On Condition DL = Data Locked
Event scheduler status:
State : INITIALIZED
Thread id : 0
LLA : n/a:0
LUA : n/a:0
WOC : NO
Workers : 0
Executed : 0
Data locked: NO
Event queue status:
Element count : 0
Data locked : NO
Attempting lock : NO
LLA : init_queue:139
LUA : init_queue:149
WOC : NO
Next activation : never
150528 10:27:39 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 10:29:19 [Note] /usr/sbin/mysqld: Normal shutdown
150528 10:29:19 [Note] Event Scheduler: Purging the queue. 0 events
150528 10:29:19 InnoDB: Starting shutdown...
150528 10:29:21 InnoDB: Shutdown completed; log sequence number 718326805
150528 10:29:21 [Note] /usr/sbin/mysqld: Shutdown complete
150528 10:29:21 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150528 10:29:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150528 10:29:51 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0+deb7u1) starting as process 2604 ...
150528 10:29:51 [Note] Plugin 'FEDERATED' is disabled.
150528 10:29:51 InnoDB: The InnoDB memory heap is disabled
150528 10:29:51 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150528 10:29:51 InnoDB: Compressed tables use zlib 1.2.7
150528 10:29:51 InnoDB: Using Linux native AIO
150528 10:29:51 InnoDB: Initializing buffer pool, size = 128.0M
150528 10:29:51 InnoDB: Completed initialization of buffer pool
150528 10:29:51 InnoDB: highest supported file format is Barracuda.
150528 10:29:51 InnoDB: Waiting for the background threads to start
150528 10:29:52 InnoDB: 5.5.43 started; log sequence number 718326805
150528 10:29:52 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150528 10:29:52 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150528 10:29:52 [Note] Server socket created on IP: '0.0.0.0'.
150528 10:29:52 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 10:29:52 [Note] Event Scheduler: Loaded 0 events
150528 10:29:52 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0+deb7u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
150528 11:00:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150528 11:00:27 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0+deb7u1) starting as process 2605 ...
150528 11:00:27 [Note] Plugin 'FEDERATED' is disabled.
150528 11:00:27 InnoDB: The InnoDB memory heap is disabled
150528 11:00:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150528 11:00:27 InnoDB: Compressed tables use zlib 1.2.7
150528 11:00:27 InnoDB: Using Linux native AIO
150528 11:00:27 InnoDB: Initializing buffer pool, size = 128.0M
150528 11:00:27 InnoDB: Completed initialization of buffer pool
150528 11:00:27 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!
150528 11:00:27 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...
150528 11:00:27 InnoDB: Waiting for the background threads to start
150528 11:00:28 InnoDB: 5.5.43 started; log sequence number 719068726
150528 11:00:28 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150528 11:00:28 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150528 11:00:28 [Note] Server socket created on IP: '0.0.0.0'.
150528 11:00:28 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 11:00:28 [Note] Event Scheduler: Loaded 0 events
150528 11:00:28 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0+deb7u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
150528 12:00:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150528 12:00:28 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0+deb7u1) starting as process 2603 ...
150528 12:00:28 [Note] Plugin 'FEDERATED' is disabled.
150528 12:00:28 InnoDB: The InnoDB memory heap is disabled
150528 12:00:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150528 12:00:28 InnoDB: Compressed tables use zlib 1.2.7
150528 12:00:28 InnoDB: Using Linux native AIO
150528 12:00:28 InnoDB: Initializing buffer pool, size = 128.0M
150528 12:00:28 InnoDB: Completed initialization of buffer pool
150528 12:00:28 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 720126940
150528 12:00:28 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...
InnoDB: Doing recovery: scanned up to log sequence number 720126950
150528 12:00:28 InnoDB: Waiting for the background threads to start
150528 12:00:29 InnoDB: 5.5.43 started; log sequence number 720126950
150528 12:00:29 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150528 12:00:29 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150528 12:00:29 [Note] Server socket created on IP: '0.0.0.0'.
150528 12:00:29 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 12:00:29 [Note] Event Scheduler: Loaded 0 events
150528 12:00:29 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0+deb7u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
150528 13:00:28 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150528 13:00:28 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0+deb7u1) starting as process 2624 ...
150528 13:00:28 [Note] Plugin 'FEDERATED' is disabled.
150528 13:00:28 InnoDB: The InnoDB memory heap is disabled
150528 13:00:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150528 13:00:28 InnoDB: Compressed tables use zlib 1.2.7
150528 13:00:28 InnoDB: Using Linux native AIO
150528 13:00:28 InnoDB: Initializing buffer pool, size = 128.0M
150528 13:00:28 InnoDB: Completed initialization of buffer pool
150528 13:00:28 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!
150528 13:00:28 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...
150528 13:00:28 InnoDB: Waiting for the background threads to start
150528 13:00:29 InnoDB: 5.5.43 started; log sequence number 720749312
150528 13:00:29 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150528 13:00:29 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150528 13:00:29 [Note] Server socket created on IP: '0.0.0.0'.
150528 13:00:29 [Warning] 'proxies_priv' entry '@ root@debian-76-wheezy-32-minimal' ignored in --skip-name-resolve mode.
150528 13:00:29 [Note] Event Scheduler: Loaded 0 events
150528 13:00:29 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.43-0+deb7u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Debian)
Re: try to detect crash reasons server/mysql?
2 changes:canoodle wrote:okay the server probably has a little bit to less ram?
[/code]
1.
in my.cnf:
Code: Select all
open_files_limit=65535
Code: Select all
root soft nofile 65535
root hard nofile 65535
* soft nofile 65535
* hard nofile 65535
Re: try to detect crash reasons server/mysql?
Thanks alot :) have a good day.
Re: try to detect crash reasons server/mysql?
my open_files_limit already seems pretty low...
shows apache2 is consuming most RAM... argh.
:-D
Code: Select all
mysql -u root
mysql> show variables like 'open_files_limit';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 1024 |
+------------------+-------+
1 row in set (0.00 sec)
:-D
Code: Select all
ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r | less
%MEM %CPU RSS VSZ COMMAND
5.9 0.1 30384 85140 /usr/sbin/apache2 -k start
5.8 0.2 30120 85084 /usr/sbin/apache2 -k start
5.7 0.2 29632 84640 /usr/sbin/apache2 -k start
5.7 0.2 29464 84508 /usr/sbin/apache2 -k start
5.7 0.2 29324 85384 /usr/sbin/apache2 -k start
5.6 0.2 29240 85408 /usr/sbin/apache2 -k start
5.6 0.2 29200 84248 /usr/sbin/apache2 -k start
5.6 0.2 29132 85272 /usr/sbin/apache2 -k start
5.6 0.2 28920 84200 /usr/sbin/apache2 -k start
5.5 0.2 28544 84716 /usr/sbin/apache2 -k start
5.4 0.2 28012 83076 /usr/sbin/apache2 -k start
5.2 0.2 26916 81712 /usr/sbin/apache2 -k start
19.0 0.1 97812 314408 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
1.8 0.0 9648 67936 /usr/sbin/apache2 -k start
1.5 0.0 8012 41628 /usr/sbin/named -u bind
0.6 0.0 3556 17328 php-fpm: pool www
0.6 0.0 3364 17300 php-fpm: pool www
0.6 0.0 3340 10608 dovecot/imap
0.6 0.0 3152 8160 dovecot/imap
Re: try to detect crash reasons server/mysql?
You can use cache, like nginx cache, if your cms can work normal. WordPress for example works fine.
Re: try to detect crash reasons server/mysql?
Do you have me a tutorial on how to do this?
is there a possibility to reduce amounts of backups from 3 to 1 ? :) (tight space :-D)
i gonna try those settings:
http://www.narga.net/optimizing-apachep ... ry-server/
vim /etc/apache2/apache2.conf
thanks!
vim /var/log/apache2/error.log says:
is there a possibility to reduce amounts of backups from 3 to 1 ? :) (tight space :-D)
i gonna try those settings:
http://www.narga.net/optimizing-apachep ... ry-server/
vim /etc/apache2/apache2.conf
Code: Select all
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
MaxClients 10
MaxRequestsPerChild 3000
</IfModule>
<IfModule mpm_worker_module>
StartServers 1
MinSpareThreads 5
MaxSpareThreads 15
ThreadLimit 25
ThreadsPerChild 5
MaxClients 25
MaxRequestsPerChild 200
</IfModule>
vim /var/log/apache2/error.log says:
Code: Select all
[Mon Jun 01 00:00:33 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Mon Jun 01 00:00:33 2015] [notice] mod_ruid2/0.9.7 enabled
[Mon Jun 01 00:00:33 2015] [notice] Apache/2.2.22 (Debian) PHP/5.4.39-0+deb7u2 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
Re: try to detect crash reasons server/mysql?
With wordpress? https://www.digitalocean.com/community/ ... inx-config - many-many guidescanoodle wrote:Do you have me a tutorial on how to do this?
Yep, edit your packages (left-up corner) and set nubmer of backups.canoodle wrote:is there a possibility to reduce amounts of backups from 3 to 1 ? :) (tight space :-D)
Look nice.canoodle wrote:i gonna try those settings:
Re: try to detect crash reasons server/mysql?
thanks for the hint :)
that was easy :) GREAT :)
i blogged about it ;)
http://dwaves.de/2015/06/01/linux-webse ... f-backups/
that was easy :) GREAT :)
i blogged about it ;)
http://dwaves.de/2015/06/01/linux-webse ... f-backups/
Re: try to detect crash reasons server/mysql?
Nice to hear ;-)
Good luck with your server.
Good luck with your server.