Subscribe

Archive July 2011:

Java Heap Space Issues And Windows 32 / 64 bit

In another blog post, I wrote about Java Heap Space OutOfMemoryError and how to resolve it. Then I came to the conclusion that allocating more memory to Java in Apache Tomcat would resolve the issue. It did - but only for a while.

It turns out if you run the 32 bit version of Apache Tomcat on Windows, you can only assign 1.3 GB of memory to it. In some cases it's enough, in other cases, it's not.

This is where you should really know the server Tomcat is installed on. If it's a 64 bit machine, you're probably safe. Because if you have a 64 bit machine, you'll be able to allocate more memory to Java in Tomcat.

You just need to install Java 64 bit and Tomcat 64 bit. (I couldn't find Java 64 bit on the Java website so I used FileHippo instead.)

When the 64 bit versions of Java and Tomcat are installed, you'll be able to allocate a lot more memory.

In our specific project where we use Solr (Java based) for search, Tomcat 64 bit in fact used less memory for Java than Tomcat in the 32 bit version. Plus indexing was faster.

Conclusion: if your server runs a 64 bit OS, then you should install the 64 bit Java and Tomcat versions to be able to address Java Heap Space issues.

EPiServer XForms Implementation - Some Pointers

EPiServer XForms is a pretty sweet alternative when it's up and running. However, implementing XForms is not always the simplest thing. Here are some reminders and pointers to get your XForms ready faster:

First of all, take a look at the Public Templates implementation of XForms. Then:

  1. Copy XForms.ascx + cs files to your project.
  2. Copy the XForms specific events from global.asax.cs to your project's global.asax.cs.
  3. Make sure your SMTP settings are correct. If they aren't, there will be no redirect after the XForm is posted, and therefore no thank you message will be displayed.

Particularly the XFormAfterSubmitPostedData event (global.asax.cs) is interesting. Obviously it decides what happens after a form is posted.

Here is a helpful post on XFormAfterSubmitPostedData and SMTP settings.

To the top