{"id":253,"date":"2005-02-26T16:26:41","date_gmt":"2005-02-27T00:26:41","guid":{"rendered":"\/?p=253"},"modified":"2005-02-26T16:34:41","modified_gmt":"2005-02-27T00:34:41","slug":"cfml-troubles","status":"publish","type":"post","link":"https:\/\/arcanius.silverfir.net\/blog\/cfml-troubles\/","title":{"rendered":"CFML troubles"},"content":{"rendered":"<p>The website of the <a href=\"http:\/\/www.titanrobotics.net\">Titan Robotics Club<\/a> uses the ColdFusion Meta Language (CFML) to generate and display its dynamic content. I <a href=\"http:\/\/arcanius.silverfir.net\/wp\/?p=243\">posted earlier<\/a> about how  ColdFusion was an easy language to learn, and that it seemed semantically powerful, able to accomplish a lot in not too many lines of code. While that is still true, there seems to be a dark side to the ColdFusion story or at least that of our current host, readyhosting.com. It seems that of the server&#8217;s stability leaves something to be desired, especially on start-up. For example, if you are te first person to visit the site after some period of time and (at least this is what I speculate happens) the ColdFusion interpreter has shut down, you are greeted by a hideous page with SQL statements and unprocessed cfoutput statements, which is hopelessly ugly. Occasionally when just reloading the home page, you will witness the same  phenomenon. Needless to say, we can only hope this doesn&#8217;t happen when a judge is around. So, to hopefully minimize the chance of this happening, I created a shell script that, every 30 seconds, reloads the home page, and logs whether it recieved a &#8220;big&#8221; (correct) or a &#8220;small&#8221; (incorrect) version of the page. This way, the command interpreter should remain active (hopefully) and I&#8217;ll get statistics on how often the page loads incorrectly, even after a &#8220;hot&#8221; start. Nothing like hard data with which to confront your host (or should it be Macromedia?) .<br \/>\n<!--more--><br \/>\nIn case you are interested, here is the bash script:<\/p>\n<pre><code>\r\n#!\/bin\/bash\r\nbig=0\r\nsmall=0\r\nwhile true\r\ndo\r\n        wget -q http:\/\/www.titanrobotics.net\/index2.cfm\r\n        echo got index2.cfm\r\n        mv index2.cfm dl\r\n        size=`du dl | awk '{ print $1; }'`\r\n        if [ $size -gt 24 ]; then\r\n                let \"big += 1\"\r\n        else\r\n                let \"small += 1\"\r\n        fi\r\n        echo $size >> sizes\r\n        echo big: $big, small: $small\r\n        rm dl\/index2.cfm\r\n        echo deleted index2.cfm\r\n        LIMIT=30\r\n        for ((a=1; a < = LIMIT ; a++))\r\n        do\r\n                echo -n .\r\n                let \"var0 += 1\"\r\n                sleep 1s\r\n        done\r\n        echo .\r\ndone\r\n<\/code>\r\n\r\nHere is the output so far (`tail out`):\r\ngot index2.cfm\r\nbig: 26, small: 3\r\ndeleted index2.cfm\r\n...............................\r\ngot index2.cfm\r\nbig: 27, small: 3\r\ndeleted index2.cfm\r\n...........\r\n<\/><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The website of the Titan Robotics Club uses the ColdFusion Meta Language (CFML) to generate and display its dynamic content. I posted earlier about how ColdFusion was an easy language to learn, and that it seemed semantically powerful, able to accomplish a lot in not too many lines of code. While that is still true, [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,8,6],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-everything","tag-silverfir","tag-technology","tag-trc"],"_links":{"self":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":0,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"wp:attachment":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}