Sunday, April 20, 2014

Android Bitcoin OutOfMemoryError Or Crashing On Startup

This page explains the problem: https://code.google.com/p/bitcoin-wallet/wiki/OutOfMemory

At one point, it got so bad that the application would not even start anymore.

Solution:

  1. Get Root Explorer
  2. Navigate to your system folder and open "build.prop" in the text editor
  3. Edit "dalvik.vm.heapsize" and "dalvik.vm.heapgrowthlimit" to the following:
    dalvik.vm.heapsize=256m
    dalvik.vm.heapgrowthlimit=128m
  4. Restart your phone, open the bitcoin application, and backup your keys before it crashes again.

Monday, April 14, 2014

Lock wait timeout exceeded - MySQL

OperationalError: (OperationalError) (1205, 'Lock wait timeout exceeded; try restarting transaction')

After trying a bunch of different solutions in the code, I ended up having to restart MySQL to get this error message to go away.

Solution To Apache Triggering OOM-Killer

In this instance, we were getting hit with web crawlers according to the access log and the syslog was saying this: /usr/sbin/apach invoked oom-killer

This issue occurs when apache opens up too many child processes, uses up too much memory, then OOM killer starts shutting down random processes like mysql.

The problem ended up being that our apache2.conf did not have any configuration limiting the number of processes that Apache could open. It might have had a default, but the default was too high. We were using Apache ITK MPM and the apache2.conf only mentioned prefork, worker, and event MPMs. You can check which MPM you are running with "apache2 -V".

Adding this to the configuration solved the problem:
<IfModule mpm_itk_module>
    StartServers 5
    MinSpareServers 5
    MaxSpareServers 10
    ServerLimit 75
    MaxClients 75
    MaxRequestsPerChild 5000
</IfModule>

At first I had the ServerLimit and MaxClients set to 150 and it seemed like apache was ignoring ServerLimit and Maxclients. However, ITK MPM creates an extra fork for each request (according to their site), that's why there was 200+ processes running for my limit of 150. So, the process count is going to be 2x the limit you set.

Thursday, April 3, 2014

Edit A Sharepoint List Page

Add the following to the end of the List page's URL:  ?ToolPaneView=2