• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Random but Regular CF9 503 Error - CF-out.log Jrun errors

New Here ,
Jan 11, 2011 Jan 11, 2011

Copy link to clipboard

Copied

Environment

  • ColdFusion version: CF9 32-bit (NOT the 9.01 Patch yet)
  • Hotfix version None
  • server OS : Windows 2003 Server 64 Bit
  • webserver: Apache/2.2.14 (W32) 32 bit
  • database: MSSQL 2008 Express with Advanced Services 32 bit

Background

1.  Porting an old cold fusion code base from 2002-2006 to CF9

2.  I am randomly but quite frequently getting 503 errors in the browser on the above environment AND a development environment running WinXP, Apache 2.2 32 bit, CF9 32 bit, MSSQL 2008 Express with Advanced Services 32 bit.

The 503 errors seem random and they are frequent.

These 503 errors are happening on both the application and on the CFIDE/Administrator (though not as often).

No one is using this application but me.  It is under test and development.  Obviously, can't go to production with this problem.

3.  The 503 errors are showing up in the apache access and error log.

Access Log

70.125.50.86 - - [12/Jan/2011:06:02:55 +0000] "GET /generalsignup.cfm HTTP/1.1" 503 222 "http://www.debitelite.com/index.cfm" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.634.0 Safari/534.16"

Error Log

[Wed Jan 12 06:02:55 2011] [notice] jrApache[34056: 53266]  returning error page for JRun too busy or out of memory

4.  Here is my JVM config from CF9 CFIDE/Administrator

-server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib

5.  I have NOT made any real modifications or tuning changes to this server.  I just installed CF9 tonight.

6.  I have run the Code Analyzer and it has not found anything wrong with the code.

7.  Here is what ends up in the coldfusion-out.log file.

01/12 06:02:53 error ROOT CAUSE:

java.lang.NullPointerException

at coldfusion.runtime.Cast._double(Cast.java:833)

at coldfusion.runtime.Cast._int(Cast.java:456)

at coldfusion.runtime.Cast._int(Cast.java:461)

at coldfusion.runtime.ClientScope.UpdateGlobals(ClientScope.java:127)

at coldfusion.runtime.ClientScopeServiceImpl.PersistClientVariablesForRequest(ClientScopeServiceImpl.java:323)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:33)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)

at coldfusion.CfmServlet.service(CfmServlet.java:200)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

javax.servlet.ServletException: ROOT CAUSE:

java.lang.NullPointerException

at coldfusion.runtime.Cast._double(Cast.java:833)

at coldfusion.runtime.Cast._int(Cast.java:456)

at coldfusion.runtime.Cast._int(Cast.java:461)

at coldfusion.runtime.ClientScope.UpdateGlobals(ClientScope.java:127)

at coldfusion.runtime.ClientScopeServiceImpl.PersistClientVariablesForRequest(ClientScopeServiceImpl.java:323)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:33)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)

at coldfusion.CfmServlet.service(CfmServlet.java:200)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

01/12 06:02:53 error (JRun Service: ProxyService [jrun.servlet.jrpp.JRunProxyService@1da1a47]) JRunPRoxyServer.invokeRunnable:

java.lang.IllegalStateException

at jrun.servlet.JRunResponse.getWriter(JRunResponse.java:205)

at jrun.servlet.JRunResponse.sendError(JRunResponse.java:597)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:328)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

java.lang.IllegalStateException

at jrun.servlet.JRunResponse.getWriter(JRunResponse.java:205)

at jrun.servlet.JRunResponse.sendError(JRunResponse.java:597)

at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:328)

at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

8.  This is NOT isolated to a single page or the same page every time.  It happens on pages where very little and/or no processing is taking place.

Anyone have some insights?

Thanks

Stephen Cannon

Views

11.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Hi Stephen,


I would like to commend the detailed posting.


>Error Log
[Wed Jan 12 06:02:55 2011] [notice] jrApache[34056: 53266]  returning error page for JRun too busy or out of memory

This is similar to error detail noted here (unfortunately  unresolved) where jrun_iis6_wildcardYYMMDD.log reports similar error
http://forums.adobe.com/thread/772471


I think apply CF9 updater1

You are running CF in dev mode (ie without a standard licence installed) so should be able to use CF Monitor. Does CF Monitor show anything being a problem?

Without commencing some JVM logging I think MaxPermSize192m might be small, perhaps set to 256m. What are your minimum and maximum JVM memory heap values? Perhaps an initial setting to PermSize is a good idea as well since you do not have one set,

HTH, Carl.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Carl;

My Max JVM Heap Size is 512 MB

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Hello,

Your POST seems to be related with mine. Take a look here: http://forums.adobe.com/message/3384556#3384556

The big difference is you are using Apache but...

Can you check if there is an other error just before the 503 ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Steve, I would really recommend you read a blog entry I did that discussed solving this kind of problem in detail. You're on the right track, but not quite far enough:

http://www.carehart.org/blog/client/index.cfm/2010/11/3/when_memory_problems_arent_what_they_seem_part_1

To be clear, no one can give you "the answer". You need to find out what's happening on your machine, and then solve the real root cause (and as I explain in the entry, don't focus on the "last" message you see in the -out.log. That may not be the root problem.)

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Guys;

Forgot to post machine specs.

XEON 3 Ghz

1 Gig of Ram

30 Gig drive space

on a Parralells Virtuozzo Virtual Machine

Resources

CPU is hardly being used most of the time.  Memory does climb when CF9 is running.

Memory climbs to about 85% with only myself testing.  This of course worries me in terms of this being a production solution.  This is not a complex application with complex programming.  Based on having worked in PHP and in Java then this should not be consuming this much resources.

The error happens with only one user casually clicking the pages.  No load.  No high traffic.  No other users.

Carl and Erloz....

Thank you, I read your post last night in detail before I posted mine.

I am going to try some of your recommendations and do some more monitoring.

Erloz, the only server response that precedes this problem is a 503.  The 503 is actually the response to the browser.  It is almost as if the page isn't procesed at all.  There are just 200 responses before and after the 503 response.  In fact, this 503 error and then the cf output errors happen extremely quickly.  Like I said, like the page isn't being processed by the server at all.

Charlie....

I also read your article last night but I was bleery eyed and delirious after a long 18 hour day and plan on revisiting it in the next couple of days and reading it in detail.  I don't believe this is a memory issue.  I can't fathom how it logically could be, afterall there is one user, it is happening randomly, it is happening on casual page usage that has very little cold fusion processing.

In summary, I am bit disappointed so far.  I started using Cold Fusion back when it as DBML and shipped with O'Reilly webserver.  I left CF for PHP and Java because of the vast free and open source resources.  I just returned to the CF world in October very excited about all the features and ease of use and all the low level 'work' that CF does for the developer (especially control/input element binding) but I can't believe such a simple application isn't running smoothly.

After I try some of the things suggested, I am thinking of trying this application on Cold Fusion 8 or porting it to PHP or Java.  I have an old version of the application that will run on MX flawlessly with high traffic loads.  Maybe this is a CF9 issue.

If you guys can think of any other recommendations I would be eternally grateful!

Cheers and have a nice day

Stephen Cannon

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Steve, just one point of clarification: CF is not inherently unstable. Whatever is happening for you is unique to your setup and can be resolved. Of course, others may experience the same or similar problems, but you don't want to conclude that somehow CF can't handle what you want to do. Whether a single user, or a million users, all problems can be solved. You just need to find the right diagnostics, connect the dots, and make the problem go away.

I'll reassert that even if you "don't think you have a memory error", you may--and not due to the heap. On the other hand, just because you "memory climbs to 85% memory" also doesn't mean you're having a problem in the heap. I see you said that you couldn't read all the blog entry, but I trust that if you do, you'll better understand what I'm asserting here.

We do hope to help solve your problem, and nearly always, we can, with your help.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

This may not have anything to do with your problem, but it looks to me like you haven't disabled global client variable updates. If you don't need that enabled, I strongly recommend you disable it, as it causes your server to do significantly more work than it would otherwise. Global client variable updates happen on every page, which would explain why you're seeing this with any page. Unless you're referring to Client.HitCount or Client.LastVisit, you can disable global client variable updates. If you are referring to those variables, maybe you could change your code so that you don't need to - they don't add that much value in my opinion.

Also, I wouldn't be so quick to assume you're going to have this problem in production. After all, it's unlikely you'll be running on Windows XP with Apache in production, right? I would test this against your production environment to see if you have this problem. If it's possible for you to use a 64-bit production environment, even better!

Finally, I'd like to congratulate you on a good question post. It's far too rare for people to provide all the information you did.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Dave;

Thanks for the recommendation.  I will try it.

The only thing I am using is Session variables (objects of CFCs) after a user logins with the <cflogin functionality that CF9 has.

Also, I am on XP in development.

Production specs are above but 2003 Server 64 bit.  But I am running apache 32 bit and cold fusion 32 bit on the 2003 64 bit server in production.

I had planned on going with Apache because it is so much easier to deal with and I have never had any performance issues with it.

I am not going with the Apache 64 bit because they don't have a stable release yet, although I could still give Apache httpd 64 bit a try.

I went with CF9 32 bit because the 64 bit one was acting funny with Apache http 32 bit.

I don't see any issues running 32 bit of either of those in a 64 bit environment.  They aren't really old legacy applications.

Again, I may just try CF8 if none of this works.

I am using CFC's bound to some <Cfform> <cfselect> elements and the application.cfc and <cflogin stuff.  I will have to see if this works in CF8 after I try some of this tuning stuff.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

I would strongly recommend the use of a 64-bit version of CF in production. I would also recommend that you use IIS instead of Apache in production for this reason. IIS 7 is solid. IIS 7 is easy to deal with.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Dave;

IIS 7.0 or 7.5?  and it can run on Server 2003 64 bit?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

I'm sorry, I thought you'd listed Windows Server 2008, not 2003. My recommendation is that you use whatever version of IIS comes with your version of Windows. IIS is a system component, not a standalone application.

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Dave;

I think IIS 6 shipped with 2003 Server?  I will have to check or check out 7.0 or the new 7.5 if you recommend.  I already stripped my OS of IIS.

Erloz;

I solved the 503 error, white Server Error page returned, and the coldfusion-out.log Null Pointer errors.  By accident.  Not on purpose.  But they have stopped.  The server is running hella-fast and very responsive.  Not a single error yet.

All I did was set <cfset This.clientmanagement="False"> in my application.cfc pages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jan 12, 2011 Jan 12, 2011

Copy link to clipboard

Copied

Hi Stephen,

>
>Memory climbs to about 85%
>1 Gig of Ram
>Max JVM Heap Size is 512 MB

It is not necessarily a problem to see memory climb. CF (which is Java inside) will grab memory and may hold it so it virtually has some amount of memory however not all the memory will be committed. The JVM heap is Java Old and New Generation together, there are other buffers Permanent Generation (PermSize in JVM args) and Code Cache plus more. Jrun,EXE can commit more memory than what is set by “Max JVM  Heap Size”.

CF Monitor can help you get an indication of what the JVM heap (Old + New) is looking like with how much memory is virtual and committed.

Still think updater1 is a good idea to apply.

>what IIS

I run CF9 32 or 64 bit on Win03 / 08 32 or 64 bit with IIS (whatever version comes with Win) and are able to have many users with sessions. Having said that on occasions have used Apache (probably not since CF6-7) so I am probably not is a good position to offer advise if Apache is causing problem. As I recall once I found a version of Apache that worked well with the Win I stuck with that.

HTH, Carl.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

I'm still thinking that the key about the 503 is:

01/12 06:02:53 error (JRun Service: ProxyService [jrun.servlet.jrpp.JRunProxyService@1da1a47]) JRunPRoxyServer.invokeRunnable

This error may be produced by a request that perhaps end with a 200 status...

The 503 should be related to the request which happened 3 seconds after:

[Wed Jan 12 06:02:55 2011] [notice] jrApache[34056: 53266]  returning error page for JRun too busy or out of memory

Is the exception about jrun.servlet.jrpp.JRunProxyService is always after the NullPointerException about the ClientVariables ?


Have you try to enable "verbose" ?

When you say "regular 503 error", how much in a day ?

Is it possible to sniff traffic on the server during a reasonable duration to catch some 503 examples and see exactly what's happened between client and server ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Erloz;

I solved the 503 error, white Server Error page  returned, and the coldfusion-out.log Null Pointer errors.  By accident.   Not on purpose.  But they have stopped.  The server is running  hella-fast and very responsive.  Not a single error yet.

All I did was set <cfset This.clientmanagement="False"> in my application.cfc pages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Carl, Charlie, Erloz, Dave;

I wanted to thank you for your support and assistance in these matters.  Erloz, thank you for posting lengthy information on a similar type of experience and maybe the same problem.  I hope you solve or have already solved yours.  Carl and Dave thank you for all the information and recommendations.  Invaluable to say the least.  Charlie, big thank you for the support, instruction, education, and inspiration to figure this out.  I admit, I was waving my hands in the error declaring disaster and pointing to the technology and product as the source.  But, honestly the source of this problem is my own ignorance with CF having left it a decade ago and only recently returned.  I have to admit you can accomplish A LOT more with CF with A LOT LESS code in a MUCH SHORTER time than any other language I have used and I run other LAMP servers and have some Java/J2EE systems (beasts man, beasts to deal with!).

I have set this thread to Problem Solved!

I changed the following in my application.cfc

<cfset This.Clientmanagement="false">

I left Client Variables turned on at the server level set with the default configuration.  In my experimentation, when I turned it off at the server level my<CFForm <CFSelects bound (binding) to CFC's stopped working.  I have set a later date to explore why this is the case, but for now, my site is working very well.


Again, thank you guys!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Thanks for all the updates, Steve, and for the kind regards. Glad to hear your confidence in CF is restored.

As for your client variables problem, it is indeed a pernicious one (and that Dave had suggested might be an issue, earlier in the thread).

As for the "why" it's a problem, it's not that there's any direct connection to CFFORM or CFCs. I'll explain things, but it's not a "twitter" answer (which is why few understand it). For those with the stomach to learn the details, here goes.

Rather, it's due to a default configuration that I like to refer to as the parking brake of CF. People often suffer it unwittingly, when people enable Client variables in their app (clientmanagement is enabled for an app), even if they NEVER use them. If you enable that, CF will by default track two "global client variables": hitcount and lastvisit, on every page request (reading them AND updating them).

There's an option which controls this, in each client variable storage setting (on the CF Admin client variables page, selecting each client variable repository) called "disable global variable updates". This option is NOT turned on by default. If it's checked, then CF will NO LONGER read and update those values, EXCEPT on pages that really use client variables.

So what was happening? Likely, you had lots of requests against this server that were causing contention to whatever was your client variable repository (set via ClientStorage alongside ClientManagement, or defaulting to whatever is selected as the default in the CF Admin client variables page). And even if one would say, "no, there was no other traffic at the time", well, there is also a periodic purge of these client variable repositories which happens by default at 67 minute intervals (again, configured on the Client Variables page). If that was running when you tried to execute a page, that page may be blocked because of the deletes happening (from CF) in the repository. Also, even if that wasn't the issue, sometimes there's traffic happening on one's site that is not obvious, which could itself also be causing reads/writes of these client variables.

Unfortunately, the solution isn't always simple. Sure, you can turn off clientmanagement, which worked for you, but I'll share some thoughts for those who may read this later.

You really can only do that if you are not using any client variables anywhere in the app. If you use even one, that page will fail if you disable client variables.

Similarly, you can't just turn off the global variable updates feature, because even if you don't think you use client variables at all, a developer could have slipped in an access to client.lastvisit, for instance, if they somewhere learned it existed.

In both cases, you really need to first search your code to see if there are any references to client.hitcount or client.lastvisit (be aware that technically people can refer to them as client[hitcount], for instance, or even "client.some#var#", but the odds are pretty low, I think.) Then search for any reference to client variables at all. You could search for "client.", but again beware of other ways to refer to them.

Finally, someone may say, "well, I'll just change my default client storage from registry (or database) to 'cookie'". That, too, is not such an obvious fix. If you really are using client variables, then making that switch will effectively cause all client variables currently stored to be "lost" by your users, since nothing will move the currently stored values from the permanent storage to this cookie storage.

Then finally, going back to that purge, that can be quite a drain, too. One common problem is if the client vars are stored in a DB and that DB has no indexes on the keys that CF uses to do the purge. Similarly, one may want to try to do the purge themselves. There used to be an Adobe technote (a Macromedia one, from long ago) that covered that (and showed the SQL used), but there has been a recent purge of old technotes and I can no longer find it. But others have blogged about it, such as this:

http://www.dansshorts.com/post/sql-blocking-and-client-variable-purge

I'll note as well that you can watch the SQL being generated by both every request (using clientmanagement) and the purge process, if you wrap the datasource and watch it with tools like FusionReactor or SeeFusion. I blogged more about such datasource monitoring with FR:

http://www.carehart.org/blog/client/index.cfm/2008/7/22/fusionreactor_datasource_monitoring

As for observing/purging the registry, both take more work. One can watch the registry updates with various tools, such as SysInternals Process Monitor. As for purging the registry, that's really quite a lot harder. For instance, even as I tell you where to find the keys in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\ColdFusion\CurrentVersion\Clients, yes, even for Adobe versions of CF), you MUST BE VERY CAUTIOUS. Do not just open regedit and visit this key, to try to do the delete. If it has hundreds of thousands or millions of keys under it (one for each "client" that's tracked), then you’re your expanding that folder this way in Regedit could lock up your machine. Again, that old technote used to refer to a tool that was offered to try to delete them from the command line. Adobe does at least warn people against using the registry (but I doubt many ever see it):

http://kb2.adobe.com/cps/000/ce14cfd1.html

There's no question that this whole issue of client variablesand the global ones in particularare a real sore point for many, and often without them even realizing it. I do wish Adobe would change the default for new installs to not be registry, but I understand that for updates, they can't presume to change that.

I've hinted at a lot of this stuff above in a blog entry I did on the impact of spiders and bots (which can exacerbate this problem, along with session variables), but perhaps I need to post all this additional detail (and more) as a new blog entry. Until then, hope that the info here helps someone, and of course, feedback is always welcome.

/charlie arehart

charlie@carehart.org

Providing CF and CFBuilder troubleshooting services

at http://www.carehart.org/consulting


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Charlie;

Thank you again for all the valuable information.  You my friend are rad smart!

Right now I am not using any client variables, rather only session ones, and it is all my code so no worries of any client var references in it.

While I do planning on using Client variables later in my product development cycle I do plan in revisiting Adobe's documentation, your website, and this thread again before I do!

As well, the server is RIPPIN FAST now too!  I mean blazing speeds that I hadn't expected.  Very awesomely rad!

Interestingly you mention bots, well strangely I have only had this system online for 48 hours now and it was and is being hit pretty regularly by Google Bot and Google Imagebot and I didn't give Google the domain.  I think it picked it up from this thread actually.  Google wasn't getting any 503's but I sure was and a couple of other testers were. I think the bot visits increased the frequency of the problem which made it more apparent than on my development environment (which only saw the problem occasionally).

Now that I have the Client vars turned off things are running exremely smoothly even my cfform elements bound to cfc's.  Which by the way the binding to client side cfc's and javascript generation is extremely rad and a time saver!  It reminds me of the Google GWT and GWT Designer stuff I have been working with.

I hope this solves Erloz's problem too!

Gotta run.  TPS reports due by Friday!

Cheers

Stephen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2011 Jan 13, 2011

Copy link to clipboard

Copied

Good stuff, Stephen. Thanks for the update and the kind regards.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 09, 2011 Sep 09, 2011

Copy link to clipboard

Copied

I thought you all might want to know that yet another person ran into this same issue.  I am so glad you posted in here and that shutting off clientmanagement would stop the issue.  I implemented that fix and thus far it seems to be working.  The problem was extremely random on my system as well.

CF9 Ent 9,0,1,274733
Java 1.6.0_17

Win 2003 32 bit

IIS 6

Dual Core processor

4 Gig of ram

2 CF 9 instances both set as:
java.args=-server -Xms512m -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/

Same types of errors in my 'jrun_iis6_wildcardxxxxxx.log'

I agree with Charlie, that this doesn't seem like it should be the "proper" fix for this, but I am at a lack on how to track it down as well.  I am going to see if I can get the error to occur on my test environment and I will go through your blog post thoroughly Charlie and attempt to diagnose it.

Thanks,

Daniel B

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 11, 2013 Jun 11, 2013

Copy link to clipboard

Copied

I ran into this same error when using client variables.  In my case the cause was using the StructClear function on the client scope was trying to clear all of the variables in that scope when some of these are not clearable, namely "you cannot delete the system-provided client variables (CFID, CFToken, URLToken, HitCount, TimeCreat..."

I replaced the code:

<cfset StructClear(client)>

With the following code which uses the GetClientVariablesList() function to return all of the variables in the client scope except CFID, CFToken, URLToken, HitCount, TimeCreated, and LastVisit and put these into a variable named client_variables.  After checking to make sure there are values in this variable I loop over this comma-delimited list and delete each of these variables.  The code that follows fixed my problem with the error message mentioned in this thread.

  <cftry>

    <cfset client_variables = GetClientVariablesList()>

    <cfif Len(Trim(client_variables)) GT 0>

      <cfloop list="#client_variables#" index="i">

        <cfset IsDeleteSuccessful=DeleteClientVariable(#i#)>

      </cfloop>

    </cfif>

    <cfcatch type = "Any">

      Problem clearing the client variables

    </cfcatch>

  </cftry>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2013 Jun 11, 2013

Copy link to clipboard

Copied

LATEST

But let’s do be clear, Troy, in case someone comes along later looking for a solution to the problem and might misread your post. (I appreciate that you wrote it clearly enough for most folks. I just know from experience that some will read causally and could misinterpret things.)

You’re not saying that doing this code would be a solution to the problem reported by Steve here (which was merely his use of client variables, under stress, which had problems).

You’re saying that you (for whatever reason) had wanted to clear the client variables for a given user at a given point in your request, and when you tried to do it with StructClear, that’s when you got the error that they did (and perhaps in googling, you found this thread, looking for any solution).

But what you did to solve the error in your case was change to clearing the client vars (when you wanted to do that for whatever reason) using the deleteclientvariable instead, one at a time.

So you’re not saying that people need to do this to solve the problem originally reported (which is how I fear some could read it), but rather just that “if you want to clear client variables for a user at some point in time, for whatever reason, don’t use structclear but instead use deleteclientvariable”.

Now, you may notice I have said a few times, “for whatever reason”, because here too I wouldn’t want people to be left with an impression that they typically need to do this. Client variables get cleared up by the recurring client purge process (as configured in the CF Admin, with respect to how often it runs, and how many days old a client variable entry can be before its values are purged). But you are choosing to do it manually, and not to “all client variables” but rather to those used by a given user, at some point in the life of the request. That’s a fairly unusual process, I’d think. So I just don’t want readers to come away thinking it’s something they should be doing. (If you’d care to share why you do it, it may help some readers.)

I do know that some people switch to using client variables as an alternative to session variables (such as when on a cluster of instances and not wanting to use session replication between them), and whereas session vars can be terminated in minutes, client variables can only be terminated based on being x days old (as configured in the CF Admin client variable repository details page), so if you need to “force” a client variable to be “emptied” without waiting at least a day, you thus have to “do it yourself”. Is that right? Or might you have still some other reason?

Hope that’s helpful to future readers.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation