Posts Under ''

java.lang.OutOfMemoryError: Java heap space

Problem: The error ‘java.lang.OutOfMemoryError: Java heap space’ is caused when the JVM (Java Virtual Machine) runs out of available memory during processing. This can be caused by: a large number of files on your system an extremely large benchmark document memory leak with some apis / user defined classes The default heap memory in JVM […]

Read more »


Multiple Instances of Tomcat with Apache

Learn how to use mod_jk to forward requests to specific hosts when more than one Tomcat instance is running. Recently, I was asked to reorganize some of our Web applications to improve their stability. The major push was to get each of our applications running in its own instance of Tomcat. These applications all are […]

Read more »


Tomcat 5 on Fedora Core 6: In Five Easy Steps

Install FC6 and Apache Web Server Stick the Fedora Core 6 DVD in and reboot. Then follow the instructions. I took all defaults where I can, including letting it “delete all Linux partitions” and automatically partition the disk. I choose to install “Web Server” and “Development Tools” when offered the chance. This installs the Apache […]

Read more »


Virtual Hosting with Tomcat

This is a guide on setting up Tomcat to do virtual hosting and make it behave like a simple webserver with jsp and servlet support, for many different sites all hosted on the same IP address. The aim is to have a single directory for each virtual host, which can be manipulated individually without hassles […]

Read more »


PHP – MySQL order by random

To select random rows from mysql database table, you can use below query: Here, I’m trying to select a random row from a table in a MySQL database. Syntax: SELECT * FROM table_name ORDER BY RAND()

Read more »