REST with ColdBox - Out of Memory Issues

Probably (I hope) a somewhat simple problem to solve, however, I am in the process of completing a RESTful platform using ColdBox. Everything is working great, however, I am now seeing the application failing with GC and Out-of-Memory errors.

The ColdBox app lives in a subdirectory and a current application and creates its own application environment, etc. I guess my basic question is since the ColdBox app is only providing REST services, is there a way to disable use of session variables, etc. Since the services are getting hit quite often, I believe the session scope is filling up. What is weird is that I have the session timeout (in Application.cfc) set to a very low value (2 minutes) which I would think would resolve this issue.

Any ideas? Would switching to Client variables be an advisable solution as they would not persist in memory?

Kevin S. Anderson

INDURE Team Software Engineer

image001.jpgIntelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com

Kevin,

It has been my experience that if you are getting GC errors, then you might be storing too much in the session scope. If you are creating a RESTful service API, then the only thing needed in the session is if they are authenticated or not.

image001.jpg

Thanks, Andrew. Note; however, that I am not storing (explicitly) anything in the session scope.

Kevin S. Anderson

INDURE Team Software Engineer

image001.jpgIntelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com

Ok, are you using the normal REST with Coldbox or ColdFusion 10’s way of doing it.

How many concurrent request’s are you getting?

image001.jpg

Also do you have a monitor like fusion reactor.

What are your JDK parameters and version?

Usually vanilla settings suck for real projects.

I’m using REST with ColdBox on CF9 Enterprise (32-bit). SessionManagement is enabled with a timespan of 0,0,5,0. ClientCookies are disabled.

The JVM is configured with a heap space of 1024MB.

Kevin S. Anderson

INDURE Team Software Engineer

image001.jpgIntelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com

What about perm space?
Do you have fusion reactor

Hi, Luis:

I don’t have Fusion Reactor :frowning:

Still drilling down into it. Very weird. With nothing hitting the system except a script that ran once per minute (to queue media for distribution) and a job that ran every 5 minutes calling REST services, I was seeing memory used running to the top. I added JVM GC into the onRequestStart handler method, if free mem dropped below 100MB, and that has made everything happy.

Kevin S. Anderson

INDURE Team Software Engineer

image001.jpgIntelligent Software Solutions Inc.

Global Enterprise Solutions Division

Phone: 719.452.7456 | Cell: 719.930.2599

Email: kevin.anderson@issinc.com