[ColdBox 3.5 Final] Strange behaviors after upgrade

Hello all, after releasing ColdBox 3.5 to our production servers as part of a release last week, we began seeing very weird behaviors across all 4 of our production servers which adversely affected performance to the point where we eventually had to revert back to ColdBox 3.1 until I can figure out the source of the issues.

I haven’t ruled out the possibility of something stupid going on in my own code base, but I ran many hours of jmeter tests and can very reliably produce the behaviors with 3.5 and they completely go away as soon as I swap out for the previous version of ColdBox. I wanted to see if anyone else has seen these issue at all. My environment is 64-bit Windows, CF9 Ent, IIS7.

The three main behaviors I saw were:

  • Randomly hanging requests. These would pop up within 20-30 minutes of any load on the server, and affected any page on the site. They would time out after about 5 minutes. A number of different pages would hang, but in EVERY case, the line of code was accessing a CGI-scoped variable and the top part of the stack trace was identical. My understanding of CGI vars is that CF talks to IIS over the JRUN connector and asks it for the headers on the request. The threads were all stuck at a socketRead() and could not be killed (though they would time out eventually)

Full thread dump Java HotSpot™ 64-Bit Server VM (14.3-b01):“jrpp-6” runnable
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:581)
at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:573)
at jrun.servlet.jrpp.ProxyEndpoint.readString(ProxyEndpoint.java:622)
at jrun.servlet.jrpp.ProxyEndpoint.getHeader(ProxyEndpoint.java:762)
at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124)
at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124)
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221)
at coldfusion.runtime.CgiScope.resolveName(CgiScope.java:274)
at coldfusion.runtime.Scope.get(Scope.java:60)
at coldfusion.runtime.ScopeSearchResult.searchForSubkeys(ScopeSearchResult.java:104)
at coldfusion.runtime.LocalScope.search(LocalScope.java:417)
at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:738)
at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:662)
at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1718)
at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1677)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1812)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1805)

  • Higher-than-normal memory usage My servers are normally happy around 1.5 to 2.5 GBs of heap used. Memory usage jumped to 4 - 6GB of heap in use. (Total heap is 8GB) I think there’s a chance the high memory usage was caused by the hanging requests, but that’s just a hunch.
  • Null Pointer Exceptions on every request The worst behavior of all is after a few hours of uptime, servers would just completely fall over and begin returning the following error on every single request. What was interesting was our non-ColdBox legacy site on the same server would respond fine, but the ColdBox site would just begin erroring out on every page hit. This would continue until the ColdFusion service was restarted. The error was deep in the bowels of Java and usually seems to be related to resolving interface implemntations such as the trace below which was thrown when Controller.cfc tried to create an instance of coldbox.system.ioc.Injector. It’s interesting to note that Injector implements an interface in 3.5, but not in the previous version we rolled back to.

java.lang.NullPointerException
at coldfusion.runtime.InterfaceTemplateProxyCache.getTemplateProxyFromPath(InterfaceTemplateProxyCache.java:125)
at coldfusion.runtime.TemplateProxy.verifyInterfaceImpl(TemplateProxy.java:1072)
at coldfusion.runtime.TemplateProxy.verifyInterfacesImpl(TemplateProxy.java:880)
at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:67)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:4827)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:4841)
at cfController2ecfc1193051760$funcINIT.runFunction(D:\websites\wwwroot\common\coldbox\system\web\Controller.cfc:62)

Let me know if any of you recognize any of these errors or if you have any ideas. I’m going to keep running tests to see if I can narrow down what causes these behaviors.

Thanks!

~Brad

Sorry Brad,

I cannot recognize any of these issues you are having at all. 3.5 was put to the test for more than 12 months, so this would have been caught, so not sure what is going on.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano