Caveats with Railo running on Helicon zoo

Railo Add comments

One of my Railo sites has a scheduled task which is supposed to run every night at midnight, which I noticed recently had not been running as it usually sends me an email. After an initial bit of head scratching the cause was actually obvious, if you understand how helicon zoo works and how Railo runs inside Zoo, if you don't then I suggest reading THIS ARTICLE.

Because Railo runs as an IIS process using Helicon zoo, this means that the application shuts down after a period of inactivity as defined by your application pool settings, this is good in that it conserves system resources for sites which are not very busy, but it is also bad for Railo for several reasons.

  • every time the application pool shuts down, so does Railo/Java.
  • every time the application pool restarts, Railo must start up again, this can make initial page load rather slow.
  • every time Railo shuts down, you lose anything that was cached, this must be reloaded again when railo restarts.
  • scheduled tasks will of course not run when Railo is not running.

for a small site with no scheduled tasks this probably is not an issue, but if you run a site that does a lot of caching and has a slow start up time, such as mango Blog or Mura CMS, then this could be an issue. also if you have any scheduled tasks which you rely on, this also will be an issue.

In my case the problem was I had setup the scheduled task on the default website, which is never used for anything other than accessing the railo admin and running this scheduled task.

In case this is an issue for you then there are several workarounds.

  1. you can Increase the application pool idle timeout, this is how long it will wait until it shuts down when idle.
    app_pool_timeout
  2. setup a scheduled task that calls a CFM page on your site every 5 minutes, which in theory should keep it active, although this may not be the most reliable method.
  3. RECOMMENDED: setup monitoring for your website which makes a http request every 5 minutes, thus keeping the site active. If you do not have your own monitoring system then you can find plenty of options on Google.
  4. There are also plenty of websites out there which offer online cron jobs, many of which are free, you could use one of these to execute your scheduled tasks or just to keep your site active.
  5. Use windows scheduler to run any page on your site every five minutes or just use this for your scheduled tasks instead of railo.
    you can do this using powershell, just set the following command to execute, replacing the url with your own. Make sure you have powershell installed of course.
    powershell.exe -command "(new-object system.net.webclient).downloadstring('http://yourdomain/task.cfm)"

3 responses to “Caveats with Railo running on Helicon zoo”

  1. Yaroslav Govorunov Says:
    Recently released Helicon Zoo support for Railo on Tomcat installation resolves these caveats. So to have one global Java process running Railo on Tomcat you can use "Railo 4 on Tomcat" project templates from Helicon Zoo repository. With this project web sites are executed by a shared Tomcat instance and recycling IIS app pools does not affect application execution, as well as memory usage is lowered significantly.
  2. Ivan Rotrekl Says:
    Thank you very much for this. I am new to Railo and given the points above still a bit confused if I should choose the Jetty or Tomcat version of the Helicon Module. I have an IIS server with ~ 15 IIS sites / Mura installs running on CF 8 which I would like to convert to Railo. I'm no expert on the subject, but testing the Jetty implementation on one site with Mura & Slatwall I I had to increase the max heap size of the Railo instance, otherwise it would run into perm heap error. I would need a lot of memory to run all my sites like this. Would Railo on Tomcat be more suitable for this particular use case ? If I try to over-simplify this, should I think about Railo/Jetty as similar to CF Enterprise with each IIS site running its own CF instance and Railo/Tomcat more like CF standard ?
  3. Russ Michaels Says:
    Ivan,
    yes it is basically like coldfusion multi instances, but with the caveats mentioned because it doesn't run as a service. Helicon have now changed this anyway due to the issues I reported and have replaced with tomcat running as a service as per the regular download of Railo. I have yet to test this so do not know if it gives any benefits over the regular railo/tomcat install, so I would just use that for now if I were you.
    The Railo JVM settings are low by default on every install, so you will need to tweak them if you run multiple/heavy sites.

Leave a Reply

Leave this field empty

Powered by Mango Blog. Design and Icons by N.Design Studio