When the trial stops, are you restarting Tomcat to resolve the issue? If you're seeing java heap space errors, you may not have adequate memory on the machine or you may need to change the Tomcat java settings.
Please provide some details regarding your configuration:
Version of o/s
RAM installed on machine
Is the machine running the trial used for other things?
Which trial was installed?
Also, please provide the logs located in ....\ThingworxStorage\logs and a screenshot of the Tomcat java settings and we will review further.