>So now the surfcam image's src points to image.cfm instead of the actual
image.
>Anyway, it seems to work great except for one small problem.
>I guess since the site is under heavy traffic, it doesn't work all
>the time, we've been getting strange errors and inetinfo.exe on the
>server is maxing out at 100%. This is starting to happen like every 10
minutes or so.
We experimented with using CFCONTENT to deliver multiple images dynamically,
and had similarly depressing results under load. In our tests, a single page
containing 10 images (15k each) was hit appx. once every three seconds. This
was enough to max out the available threads on our server.
It may be by tuning your server (upping the max thread count, etc) you could
get better performance. The issue *seems* to be more one of thread life and
volume than processor load. And I would be interested to hear more about
best practices with CFCONTENT (Dave Watts, are you listening?) In the
meantime, however, I would suggest going to one of the following setups:
If you update your image every 15 seconds or so, why not name it a random
name each time that you generate it? Generate it in a secure portion of your
site, then copy it using a random name into your web root. Store the random
name in application or server scope, then have your pages use that variable
in their src attributes. Make sure to clear the directory each time of your
previous images.
You could also put it in a protected directory and manage access through CF
Advanced Security.
Michael Caulfield
-----Original Message-----
From: Cody Estes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 12:23 AM
To: CF-Talk
Subject: CF Content (help)
I hope you guys can help me figure this one out. I'm trying to prevent
people from linking to our surfcam that we have pointed at the beach. So I
made an image.cfm file that contains code that will prevent them from
getting the 'correct' image if they aren't viewing it from our site (it
checks the referer, see code below). So now the surfcam image's src points
to image.cfm instead of the actual image.
Anyway, it seems to work great except for one small problem. I guess since
the site is under heavy traffic, it doesn't work all the time, we've been
getting strange errors and inetinfo.exe on the server is maxing out at 100%.
This is starting to happen like every 10 minutes or so. I can't figure out
the problem since the code works on my development machine and it seems like
it 'should' work no matter what.
Have you guys experienced anything like this? Is there something I'm not
setting right in the CF Header or CF Content? I've attatched the code from
my image.cfm tag below. Thanks for any help in advance!!
___________ Code Below for image.cfm ____________________
<cfsetting enablecfoutputonly="yes">
<cfif CGI.HTTP_Referer contains "mydomain.com">
<cfheader name="Content-Disposition"
value="inline;filename=""beachcam.jpg""">
<cfif fileexists("c:\inetpub\wwwroot\www\beachcam.jpg")>
<cfcontent type="image/jpeg" file="c:\inetpub\wwwroot\www\beachcam.jpg">
</cfif>
<cfelse>
<cfheader name="Content-Disposition" value="inline;filename=""bad.jpg""">
<cfcontent type="image/jpeg" file="c:\inetpub\wwwroot\www\bad.jpg">
</cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists