pydelion.com

pydelion.com

date –date="5 min ago" +%d/%b/%Y:%H:%M

Menu

Skip to content
  • about
  • contact

Monthly Archives: May 2013

Redis: “Can’t save in background: fork: Cannot allocate memory”

If you get this error

Can't save in background: fork: Cannot allocate memory

it means that your current database is bigger than memory you have. To fix the issue enable vm.overcommit_memory:

sysctl vm.overcommit_memory=1

To have if after reboot add this line to /etc/sysctl.conf:

vm.overcommit_memory=1
Posted on May 27, 2013 by dandelion. Posted in tips | Tagged redis | Leave a comment

Enabling general queries log in MySQL server

Create a log:

touch /var/log/mysqld-general.log

Set the permissions:

chown mysql:mysql /var/log/mysqld-general.log

Run in mysql console:

mysql> SET GLOBAL general_log_file='/var/log/mysqld-general.log';
mysql> SET GLOBAL general_log = 1;
Posted on May 16, 2013 by dandelion. Posted in mysql | Tagged mysql | Leave a comment

How to remove sleeping processes in MySQL processlist output

‘show procecclist‘ can be quite long in MySQL. Here’s simple way to filer out sleeping processes:

mysql> pager grep -v  Sleep
mysql> show processlist;

Posted on May 13, 2013 by dandelion. Posted in tips | Tagged mysql | Leave a comment
  • Français
  • English
  • Español

Recent Posts

  • Debian: There is no public key available for the following key IDs
  • How to renew Certificate Revocation List
  • Dovecot: Error: mmap failed with file … dovecot.index.cache: Cannot allocate memory
  • Debian: reconfigure unattended upgrades
  • Curl: how to send cookies

Categories

  • linux
  • mysql
  • news
  • python
  • thoughts
  • tips
  • Uncategorized
  • weekly digests

Tags

adaptec ansible apt bash centos curl CORS debian distributed computing dovecot fedora galera html KVM linux memtest minify mysql mysqldump nagios openssl openvz percona perl php port forwarding postfix python qemu raid rpm ruby sed sinatra smtp svn tips trac traceroute ubuntu vim virsh vnstat weekly digest windows wordpress

Knowledge is knowing that a tomato is a fruit. Wisdom is knowing that a tomato doesn't belong in a fruit salad.
Miles Kington
Proudly powered by WordPress Theme: Publish by Konstantin Kovshenin.