1

We regularly encounter performance issues with ColdFusion 8. On a farm of 3 front end servers, one gets unavailable: for some reason, the CPU goes 100% (on one core) and never goes down. When checking on Windows task manager, it appears the the jrun process is using 100% of on CPU.

do someone have a clue on how to start troubleshooting that? How to figure out what's causing the spike in first place. I'm a lot more into .net and feels a bit lost when it comes to java/jrun troubleshooting.

Our configuration is currently: CF 8 running on Windows 2008 R2 64 bits with Oracle 11g client, with 4GB RAM and a dual core CPU.

E. Jaep
  • 2,095
  • 1
  • 30
  • 56
  • Is it always the same server that does this? Or does it vary? – Sharondio Jun 11 '12 at 19:28
  • 1
    This sounds like a server admin question, not a programming question, so it belongs on [SF]. – Peter Boughton Jun 11 '12 at 19:55
  • @Sharondio: Yes, it is always the same server – E. Jaep Jun 11 '12 at 21:11
  • 1
    @PeterBoughton: You are probably right. However, I noticed that I tend to get more results when posting on StackOverflow. Furthermore, this is probably one of those in-the-middle zones where admins think it is a code fault and devs think it is a server fault... – E. Jaep Jun 11 '12 at 21:13
  • I recently wrote up my process for debugging high-CPU problems on ColdFusion here: http://stackoverflow.com/a/10909946/826714 - feel free to put your stack traces on pastebin or similar and someone will take a look – barnyr Jun 12 '12 at 08:20

4 Answers4

1

Are you using client variables? Triple check your code and if you are ensure they are not set in the registry but a database.

Paul
  • 1,577
  • 7
  • 10
0

More information is going to be needed. When you say 4 gigs of RAM you mean a 4Gig heap right? Or are you actually running a 4Gig 64bit OS? If so you should consider getting a bit more. CF 64bit uses something like 80% more RAM for the equivalent effect - in other words, a 2gig 64bit heap is the rough equivalent of a 1gig 32 bit heap.

Having said that I would not take any blanket advice about your heap size from any of us who have not actually looked at your system. Tuning the JVM requires experience its true - but it also requires practical knowledge of the system, expected traffic etc.

My other comment would be that you should definitely check the client vars. The fact that 1 core is seized up makes me think the purge task is hanging (most likely due to Client vars in the registry as Paul said. Or perhaps a scheduled task (cf monitor or fusion reactor could help tease out the request(s) that are running).

There's another stack overflow thread with some additional help on it. Ignore all that stack trace stuff and take a look at the specific "areas to examine". Build your list of stuff to try and then order by ease of implementation (or likelyhood of cause) and start trying to eliminate items as possibilities of the list.

Mark A Kruger
  • 7,183
  • 20
  • 21
  • 1
    Mark, do you have any further links/info on the 64-bit CF using 80% more memory? I know its more, due to pointer length and other bits, but 80% 'feels' high – barnyr Jun 12 '12 at 08:25
  • I have heard (in workshops) 60%, 80% and "nearly 100%" (ha).... speaking from experience though - testing apps I was migrating from one platform to the other - it is *less* than double, but not by much. So I have adopted 80% as my middle ground. I'm sure there's a definitive whitepaper out there somewhere that causes you to wish for death as you read it - but I have not found it. – Mark A Kruger Jun 12 '12 at 13:34
  • FYI - it's not just pointer bits but actual storage length in the registers I believe. – Mark A Kruger Jun 12 '12 at 13:35
  • @MarkAKruger Thanks for the insight. I'll check with our admins – E. Jaep Jun 12 '12 at 20:40
0

Have a look on this issue

Strange JRUN issue. JRUN eating up 50% of memory for every two hours

I was facing 50% of CPU usage on regular interval and it was due to client variable stored in registry. Even though you aren't using client variable but it stored in registry without your knowledge due setting added in Application.cfc/.cfm file.

Also try to figure out which thread causing issue and get stracktrace of it will help you lot to investigate more on this. In above link's answer I have posted link of my blog post and explain about how you can use visualvm and jconsole to get stacktrace of your evil thread.

Hope this help.

Community
  • 1
  • 1
Pritesh Patel
  • 1,969
  • 1
  • 18
  • 32
  • Thanks for the very interesting blog post. I discovered VisualVM. Now, I'll have to wait for the issue to occur again. – E. Jaep Jun 12 '12 at 20:46
0

If it's only one server, and you're certain that the code-bases are identical, I'd go into the cfadmin for the bad server and one of the good servers and do a line-by-line comparison of the Settings Summary. Make sure there aren't any glaring differences between the setups. Pay special attention to the versions of the DB drivers.

You also don't mention whether or not the server hardware configurations are the same. As Mark pointed out, 4 gig RAM is probably not sufficient for a 64-bit install. RAM is cheap. RAM is your friend. Get more.

Sharondio
  • 2,605
  • 13
  • 16
  • Thanks for the direction. All settings are the same on all servers. I still have to check the oracle drivers... – E. Jaep Jun 12 '12 at 20:43