What is the server capacity?
Out of memory error suggest jvm cant allocate any more heap space .
Try some of the Memory analyzer tools(VisualVm,J console etc.)
256 looks to me like a very small amount.But it depends on the size of application and real time users.
Do you have any tool to track memory leak?and prints the memory leak on the trace file?
It is very good to have a java class which can keep track of opened resultset ,connection and gives an error or warning if the objects are not closed properly.
If its a problem with unclosed object the same problem haoppens at some stage even if you allocate 512 MB memory.