Android Studio – How to increase Allocated Heap Size

——-EDIT——– Android Studio 2.0 and above, you can create/edit this file by accessing “Edit Custom VM Options” from the Help menu. ——-ORIGINAL ANSWER——– Open file located at /Applications/Android\ Studio.app/Contents/bin/studio.vmoptions Change the content to -Xms128m -Xmx4096m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=200m -XX:+UseCompressedOops Xmx specifies the maximum memory allocation pool for a Java Virtual Machine (JVM), while Xms specifies the … Read more

How to get Android crash logs?

If your app is being downloaded by other people and crashing on remote devices, you may want to look into an Android error reporting library (referenced in this SO post). If it’s just on your own local device, you can use LogCat. Even if the device wasn’t connected to a host machine when the crash … Read more

How do I prevent node.js from crashing? try-catch doesn’t work

PM2 First of all, I would highly recommend installing PM2 for Node.js. PM2 is really great at handling crash and monitoring Node apps as well as load balancing. PM2 immediately starts the Node app whenever it crashes, stops for any reason or even when server restarts. So, if someday even after managing our code, app … Read more

Mysql crashed and won’t start up

Ouch. InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html InnoDB: about forcing recovery. Check the suggested webpage: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html. Basically, try to start the MySQL server in a recovery mode and make a backup of your crashed tables. Edit your /etc/my.cnf and add: innodb_force_recovery … Read more