we used to get OutOfMemoryErrors related to the PermGen space. Is this your case ?
The thing is that each deployment leaves something in PermGen, and then depending on how big deployments you have the container can run out of memory.
There are two solutions:
1. increase PermGen space for your container
2. use managed container which can be set to be restarted after custom number of test classes
Or your problem is sowhere else ?
Yes, it's PermGen problem. I increased size of PermGen but I'd prefer fix cause of problem. Does Arquillian clear memory after undeploying test or no? I want use remote container because it work faster.
Arquillian undeploys all its' artifacts after the test execution, so in fact it's cleaning up. However memore management is up to server/jvm, Arquillian is not really in the position to do anything around that. Therefore it's not any different than deploying/undeploying normal application.