I'm running a WAS 5.1 (5.1.1.13) server where I have some clients
testing. But sometimes the server seems to crash. Application is
suddenly unavailable. The only log I can find is the following:

native_stderr.log
"JVMDG217: Dump Handler is Processing a Signal - Please Wait.
JVMDG303: JVM Requesting Java core file
Code buffer is not enough at com/xxx/yyy/CustomClass.toString()Ljava/
lang/String;. Allocated=2f19, Needed=2f24
Code buffer is not enough at com/xxx/yyy/CustomClass.toString()Ljava/
lang/String;. Allocated=2f19, Needed=2f24"

No javacore dump is created. So cannot really see what's going on.
Also when 'googling' on these errorcodes, I cannot find anything
useful. Could it be that the toString method written for this Class
internally uses a lot of StringBuffers to create a String that's
outputted?

toString code (scrambled it to remove company code...):
public String toString() {
StringBuffer result = new StringBuffer(29);
result.append("CustomClass:");
result.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx))
.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx))
.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx))
.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx))
.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx))
.append(memberToString("xxx",
this.xxx)).append(memberToString("xxx",
this.xxx)).append(memberToString("xxx", this.xxx)));
return result.toString();
}

Where memberToString is:
protected String memberToString(final String member) {
StringBuffer buffer = new StringBuffer();
buffer.append("[");
buffer.append(member);
buffer.append("]");

return buffer.toString();
}