Copy link to clipboard
Copied
Recently we upgraded from MX to CF 8, and code that worked on MX now generates a blank white screen on CF 8. The code is memory intensive and pulls large resultsets from the db and loops over them to send elerts to approx. 40k clients. By adding exittemplate calls I can short-circuit the code and so I can see that certain loops are causing the problem, but I am not sure what the solution is or why I only get a white screen and no errors on screen or in the log. I can see jrun memory usage is spiking when the task runs but I do not get out of memory errors and the other sites are still responsive. I have tried tweaking the jvm memory settings but have been unable to resolve the issue or make any headway. (eg,changing heap size from 512mb to 768 mb to 1024 mb, adding explicit calls to garbage collect in the code, etc.).
Can anyone clarify under what circumstances CF will generate a blank white page with no source code, and what solutions may exist for performing memory intensive operations.
Thanks,
Theo
Copy link to clipboard
Copied
I have the same problem. My file contains ajax-driven code and it gives me a white screen before it loads everything. Help!
Copy link to clipboard
Copied
Folks, are you sure that your that the page is completely blank (you do a view source in the browser and there's nothing there)? It can happen, but it can also be that the page has incomplete content that the browser doesn't show. Just checking.
If the page fails before CF/JRun can dump any of the buffered output to the browser, you could be left with nothing. Of course, CF should get an error and the user should see that. Along those lines, are you also sure that there's no problem with any error handling (page-level with CFCATCH, application-level with CFERROR or onError, or server-level via the Admin site-wide handler)? Again, I realize that may not be it, but just worth checking.
Finally, have you looked not just in the CF application.log but also in the -out.log, which would be in the [cf]\runtime\logs (or [jrun]\logs, if running multiserver)? They may offer more clues for you.
Copy link to clipboard
Copied
Yes, when I check the source code the page is completely blank. Checking the -out log in the runtime/logs dir confirms that I am getting java out of memory errors. Is there any reason to think that trying a different JRE would be productive? I am currently using the default java6 JRE that ships with CF 8.
Copy link to clipboard
Copied
You would benefit from upgrading to the latest JRE. There were several major fixes in 1.6.0_10 (they're up to 13 now). Though it may not fix your issue. If you are out of memory, you might want to consider turning on verbose GC and see what is running out of memory and adjust that parameter accordingly.
Or you might want to grab a copy of Fusion Reactor. It can help you diagnose what is going on as well.
Turning on VerboseGC (add to your java.args):
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC
Copy link to clipboard
Copied
@Mixtheo, you said originally, "I can see jrun memory usage is spiking when the task runs but I do not get out of memory errors and the other sites are still responsive." But your last note said, "Checking the -out log in the runtime/logs dir confirms that I am getting java out of memory errors." So just to be clear, is it that you couldn't see the errors before, but the out log showed them?
I ask because I want to help you connect if the problem is directly related to the pages in error (you said earlier, "The code is memory intensive and pulls large resultsets from the db and loops over them to send elerts to approx. 40k clients. By adding exittemplate calls I can short-circuit the code and so I can see that certain loops are causing the problem."
If the problem is really this one template, then it's curious. The end of the CFQUERY should release the memory to garbage collection. Are there any CFC's involved here? You could be having the classic issue of storing instances in shared scopes where not using VAR scope causes unexpected memory leaks.
But there are also other problems that can happen to affect you. You don't say if you're on CF8 Standard or Enterprise. If the latter, there can be useful info in the CF 8 Server Monitor. But as ke4pym, there's also a lot to be gained from FusionReactor as well, if you're on 8 Standard. I love both, and help people use them all the time in my consulting and training practice, but there are some things the CF8 Monitor can show that FR cannot, such as how many sessions you have active.
In fact, if you're on Standard, I would recommend you check to see how many sessions you have, which may have a bigger impact on memory than you'd expect. I blogged about an easy to use tool. It doesn't say how much memory is used per session, but some have been shocked to find they had tens of thousands of sessions active. See http://www.carehart.org/blog/client/index.cfm/2009/1/22/tracking_count_of_sessions_per_application.
Hope that helps.
/charlie