Hello There! I have a CPU issue that I've been pulling my hair out about for the past couple days and its time I break down and ask for help.
I'm using a Tomcat/Apache/OpenBluedragon setup for one of my servers and something is causing a CPU spike. I had been using Bluedragon 1.1 and Jetty up until this point but due to an Amazon server failure I had to uncerimoniously update to 1.3. I'm pretty sure the issue is happening in the Bluedragon Scheduler and here's why: 1. I start the Tomcat and Bluedragon server - everything is fine in my app. 2. As soon as I add a scheduled task or two the task runs and the CPU spikes to 100%. The scheduled task runs a CFM file on my server. With a few scheduled tasks in place this basically freezes the CPU at 100%. 3. If I hit the CFM file without using the task scheduler the CPU barely moves above 0. I did thread dumps on the java process running Jetty/BlueDragon and the CPU is stuck on this: "BlueDragon AlarmManager" daemon prio=10 tid=0x09570800 nid=0x115f runnable [0x62c6c000] java.lang.Thread.State: RUNNABLE at java.util.GregorianCalendar.computeFields(GregorianCalendar.java: 2154) at java.util.GregorianCalendar.computeFields(GregorianCalendar.java: 1996) at java.util.Calendar.setTimeInMillis(Calendar.java:1109) at java.util.GregorianCalendar.add(GregorianCalendar.java:971) at com.naryx.tagfusion.cfm.schedule.scheduleTask.getNextScheduledTime(Unknown Source) at com.naryx.tagfusion.cfm.schedule.scheduleTask.schedule(Unknown Source) at com.naryx.tagfusion.cfm.schedule.scheduleTask.handleAlarm(Unknown Source) at com.nary.util.AlarmManager.run(Unknown Source) I ran "ps -eLf" on my server and saw that the BlueDragon AlarmManager thread was indeed the one sucking up the CPU. I've upgraded to BlueDragon 1.4 nightly build to see if that helps with no luck. http://imgur.com/BPMLZ.png Here is a screenshot of the server for the past hour. In the past 15 minutes I've added a very simple schedule task to run every 15 seconds. In the screenshot the CPU shows it hovering around 55% but this is a minute by minute average. Its points to a hello world file and here are the contents: <cfset hellothere = "Hello World!"> <cfoutput>#hellothere#</cfoutput> Every 15 seconds when that file is hit, the CPU spikes to 100% for a period of 15 seconds and then back to 0. On another server still running 1.1 I have several Scheduled Tasks running a minute with no issue. Here is the setup for the task in the BlueDragon.XML file: <cfschedule> <task name="hello world"> <porttouse>-1</porttouse> <password></password> <resolvelinks>false</resolvelinks> <username></username> <starttime>00:01:00</starttime> <requesttimeout>20</requesttimeout> <proxyport>80</proxyport> <proxypassword></proxypassword> <publishpath></publishpath> <enddate>12/21/2012</enddate> <urltouse>http://xxx.com/HelloWorld.cfm</urltouse> <proxyusername></proxyusername> <publish>false</publish> <proxyserver></proxyserver> <publishfile></publishfile> <interval>15</interval> <startdate>01/01/2000</startdate> <endtime>23:59:00</endtime> <name>hello world</name> </task> </cfschedule> Two more interesting things: - It takes a significant amount of time to process the addition of a scheduled task from the administrator whereas when I was using BD 1.1 it was almost instant. - When I delete a scheduled task from BD it continues running until I reset the server. Here is the setup info Tomcat 6.0.29 Apache 2.2.3 Java 1.6.0_14 Tomcat Startup -server -Xss1024k -Xms1024m -Xmx1024m -XX:MaxPermSize=512m - XX:NewSize=512m -Djava.awt.headless=true - Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true $JAVA_OPTS - Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager Server - Amazon EC2 Small 1.7 GB memory 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit) 160 GB instance storage (150 GB plus 10 GB root partition) 32-bit platform I/O Performance: Moderate I appreciate any helps or insight you might have! -- Open BlueDragon Public Mailing List http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon official manual: http://www.openbluedragon.org/manual/ Ready2Run CFML http://www.openbluedragon.org/openbdjam/ mailing list - http://groups.google.com/group/openbd?hl=en
