Entries Tagged as 'ColdFusion'

Errors with CFIMAGE and CF8 image functions

ColdFusion 19 Comments »
We are running coldfusion 8 enterprise in multi-instance mode on JRUN, and we are trying to do auto image processing for uploads to convert to a standard JPG format in thumbnail and large sizes... pretty standard stuff IMHO. The problem is that CF8's new image functions completely barf on certain types of images, including greyscale gifs, jpegs with funny colour profiles or jpegs with non-72 dpi. This would manifest in either jrun bombs or simple resizes of images taking longer than 5 minutes to process instead of the usual < 5secs. This understandably lead to a loss of confidence from the users of the systems when our fancy new upgrade was so painfully slow. After much frustration we fixed some of the complete bombs happening after reading some of the great tips in this post, but we still had the long processing times to deal with. After some trial and error the way we got around it was as follows:
  1. Use cfimage to read in the uploaded file
  2. Use cfimage to save as PNG. this is the great part! saving as PNG converts the image to 72 dpi and seems to strip the erroneous colour profiles :) and doesnt affect the quality of the image
  3. Use cfimage to read in the new PNG
  4. Do what needs doing
  5. Delete the PNG
  6. Celebrate your fast and cool utility
Using this intemediary convert to PNG step literally took the processing time from 5 mins to 10 secs for the worst case JPG file we could find

5 min Subversion (SVN) Server on windows

Apache , ColdFusion , Subversion (SVN) 3 Comments »
So i've been using subversion for years at my various jobs and have found it indispensable. So i rightly thought, "how come i'm not just using this at home on my small projects and playground apps?"

It was time to fix this scenario and install SVN server on my home server (which is fine as it has a static internet IP and backup, so it's quite usable).

By far the simplest and most usable option i found for installing SVN server on windows is VisualSVN Server.

It was installed, and with its simple GUI, users created in groups and assigned to new repositories in under 5mins! It even has a secure apache rolled in for websvn that you can easily configure to a non-standard port.

There is really no excuse anymore for not giving yourself all the luxuries that SVN affords you.

eXtreme Programming

ColdFusion , Mac 4 Comments »

eXtreme Programming

Free server monitoring with alerts!

Apache , ColdFusion , Hosting 2 Comments »
So i am googling around looking for a free server monitoring solution to play with and come across this nifty (yet ugly) site: http://www.servermojo.com

Looks aside, it's got some pretty cool functionality such as: free!, can add unlimited sites, has a few monitoring methods (i chose http+keyword), has basic charts, will do email alerts, and even twitter alerts (which translates to free sms alerts via twitter!)

So you could potentially setup a few different pages like ping_apache.htm and ping_coldfusion.cfm both with just a single keyword in the file and then you could easily see if you had an alert on the ping_coldfusion and not the ping_apache that it was a jrun problem and not a server level.

Worth checking out at least, i'll post if i see any negative performance with it

New ColdFusion 8.0.1 instances in OSX Leopard

ColdFusion , Mac 2 Comments »

Creating the new coldFusion instance

  • login to the main coldfusion administrator (e.g. http://localhost/cfide/administrator)
  • go to enterprise manager / instance manager
  • select 'add new instance'
  • enter a server name (e.g. 'newcfusion')
  • leave server directory as default (/Applications/JRun4/servers)
  • leave create from EAR/WAR blank
  • submit form and wait for everything to finish
  • the link you are provided to continue will probably be broken so ignore and click on 'instance manager' again
  • open the /Applications/JRun4/ColdFusionLauncher.app and select your instance and click start if it is not running already
  • click the button next to your instance name to launch the adminstrator and configure your instance (e.g.http://localhost:8301/cfide/administrator)

Hooking the new instance into a specific apache website

For and apache website to talk to a specific jrun (CF) instance you need to bind an apache virtual host to a jrun proxyport for your coldfusion instance

  • make sure the admin jrun instance is started
  • browse to http://localhost:8000 and login with admin and the administrator password you gave when installing coldfusion
  • click the new instance from the left nav, and click services
  • you then need to note down the proxyPort (e.g. 51000) and click the green play button to start the proxyService
  • open up the httpd.conf or the apache vhost site config file and inside your <virtualHost> add:

<ifModule mod_jrun22.c>
# override the default bootstrap in the httpd.conf to bind to my new coldfusion instance
JRunConfig Bootstrap 127.0.0.1:51000
</ifModule>

  • restart apache after the cfinstance is running and it should now be using the new instance

Autostarting your new instance at system boot

You need to use a program like smultron to edit the file ColdFusion8Multi in /Library/StartupItems/ColdFusion8Multi and add: su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop newcfusion" under the line su $RUNTIME_USER -c "$CF_DIR/bin/jrun -stop cfusion" in the if block, and also outside the if block: su $RUNTIME_USER -c "$CF_DIR/bin/jrun -start newcfusion >& $CF_DIR/logs/newcfusion-event.log &" basically the same lines already present in ColdFusion8Multi but replace cfusion with your instance name, also make sure the log file has write permission!

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