503 service unavailable

305 views
Skip to first unread message

Simon Goldschmidt

unread,
May 22, 2015, 11:21:03 PM5/22/15
to lu...@googlegroups.com
Following a reboot, each time I access a subdomain for the first time I get a 503 service unavailable response from IIS rather than the usual - a 7-8 sec delay before the page is displayed correctly. If I keep requesting the page for a couple of minutes, it eventually takes its delay and serves the page. I wrote a script to perform an HTTP GET on each of our subdomains and spent a few hours refreshing the script until each subdomain loaded, one at a time, and everything behaves normally after this.... except me!

The server is Windows 2012 R2 with a clean installation of the Windows 4.5.1.000 installer, but JVM updated to 1.8.0_45. I have a couple of similarly configured servers that are behaving normally. Restarting Tomcat didn't change the behaviour. Catalina logs show the same as they do when the pages display normally with the 503 and the extra wait.

Any suggestions what might be causing this?

Thanks... Simon

Chris Blackwell

unread,
May 23, 2015, 2:15:22 AM5/23/15
to lu...@googlegroups.com

Have you tried restarting iis after tomcat? It sounds like a connector issue.


--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/948aafbd-0c50-487d-a809-082608f1d1f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bilal

unread,
May 23, 2015, 9:15:38 AM5/23/15
to lu...@googlegroups.com
Simon,
Can you share the tomcat server.xml, especially the mod_cfml valve section.

Simon Goldschmidt

unread,
May 24, 2015, 7:26:59 PM5/24/15
to lu...@googlegroups.com
The server.xml is as is was installed, but with a MaxThreads="1000" on the AJP connector.

The mod_cfml section reads:
<Valve className="mod_cfml.core"
loggingEnabled="false"
waitForContext="3"
maxContexts="200"
timeBetweenContexts="30000"
/>

I haven't restarted IIS and tested the result - I can schedule a restart, but it may result in a period of down time.

Simon

Paul Klinkenberg

unread,
May 25, 2015, 5:08:45 AM5/25/15
to lu...@googlegroups.com
Hi Simon,

The 503 can come from the mod_cfml Tomcat connector, though not sure off course.
To test this, set loggingEnabled="true" in the tomcat valve config. Then, after getting a 503, check the {railo-tomcat}/logs/catalina.out log file for messages starting with "[mod_cfml] ".

Also, but it's currently in beta, you can install the latest version of the Tomcat valve: https://github.com/paulklinkenberg/mod_cfml/blob/develop/java/mod_cfml-valve_v1.0.31.jar?raw=true
If you replace it with your current mod_cfml-valve.jar in {railo-tomcat}/lib/, and then restart Tomcat, you will have 2 benefits:
- 503 errors coming from the valve will display on-screen
- 5 x faster load time for new context, preventing errors with your waitForContext setting

Last, I would suggest to set timeBetweenContexts="1000": it has no real-world advantage to only create one host per 30 seconds, especially when the creation only takes about 0.5 seconds ;)

All in all, while using the new valve:
<Valve className="mod_cfml.core"
loggingEnabled="true"
waitForContext="3"
maxContexts="200"
timeBetweenContexts="1000"
/>

Kind regards,

Paul Klinkenberg


--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Simon Goldschmidt

unread,
May 26, 2015, 8:14:37 AM5/26/15
to lu...@googlegroups.com
Updating the mod_cfml-valve.jar and changing the mod_cfml settings in {lucee}/tomcat/conf/server.xml made all the difference. After a reboot, requests to a new domain are displaying the page in the client's browser within a second and we don't experience the 503 responses any more.

There is some good information at http://www.modcfml.org/ that was helpful in understanding this function.

Appreciate the help.

Simon



Reply all
Reply to author
Forward
0 new messages