Archive for the 'Linux' Category

3GB of memory for ColdFusion on Linux

Saturday, March 8th, 2008

There has been some discussion on various ColdFusion discussion lists regarding the maximum heap size you can allocate to ColdFusion/Jrun. Windows allows a process to grab as much as 2GB of contiguous memory. Subtracting out memory for overhead, permgen memory, etc. you are left somewhere with 1.5-1.8GB available for general heap memory.

We were considering moving one of our clients to a Linux server if that would allow us to allocate more memory to the heap. In my research, it seemed the opinions were split about 50/50 as to if Linux would allow us to allocate more than 2GB of memory. So I decided to test for myself. I placed an order for 4GB of memory and waited for them to arrive.

Once I had swapped out my 4 256MB modules for the 4 1GB modules, I increased the heap size (Xms and Xmx options in jvm.config) to 2048 and restarted the server. No problems! I kept increasing by 100mb at a time until I reached 2600 - there it failed to start, so I backed it down to 2500mb. With the permgen and other overhead, Jrun was taking up about 2950Mb of memory - indicating a 3GB limit. I have been running this way for a few days now with no problems.

Your experience may vary of course, depending on what memory options you have in your jvm.config file. I did not need to do anything special other than bump up the Xms and Xmx values.

So the short answer is Yes, you can allocate about 1GB more memory to ColdFusion when running on Linux.

Getting cfstat to work

Tuesday, March 4th, 2008

The command line statistics program supplied with ColdFusion, cfstat, has never worked for me. I’ve never tried it on Windows, but I have tried it on Linux on versions 6 and 7, and now version 8.

A little digging around told me why it never worked in CFMX 6-7. Apparently the cfstat script was looking for a particular jar file using a relative path - so it only worked if you were calling it from within the ColdFusion installation directory, which I guess I never did. Looking at the cfstat script in version 8, I can see they specify the full path.

But cfstat still wasn’t working for me in CF8, I got this error message:
(more…)

Book Review - Apache Security

Thursday, October 11th, 2007

A few months ago I decided to go on a book binge and acquired a stack of books about two feet tall. It includes classics such as The Pragmatic Progammer and Practices of an Agile Developer, as well as some on Java, Asterisk, Extreme Programming, Linux Firewalls, and a NASCAR book thrown in for good measure.

I’ve gotten through a couple, and will be posting reviews of a few of them. This week I finished Apache Security, from O’Reilly. I found this book while browsing the programming section of Borders (the programming section of my local Borders is amazing!), and I’ve found it to be a real gem.
(more…)

Problems installing the ColdFusion connector on Linux/Apache

Thursday, April 5th, 2007

Some people have encountered problems during the ColdFusion MX 7 install on Linux/Apache. When you first start the ColdFusion server, you may see something like this:

Configuring the web server connector (Launched on the first run of the ColdFusion MX 7 start script)
Running apache connector wizard...
=======================================
There was an error while running the connector wizard
Connector installation was not successful

(more…)

Upgrading the ColdFusion JVM - on Linux and Windows

Saturday, February 24th, 2007

Unless you’ve been living on a desert island for the last year, you’ve probably heard that you’ll need to upgrade ColdFusion’s JVM (java virtual machine) before March 11th 2007. Thats when daylight savings time takes effect this year. Since the dates have shifted in 2007, anything that is aware of daylight savings time will require an update. This includes your operating system (Windows, Linux, OSX, etc.), and Java since it has its own internal timezone tables.

And if you use NTP (network time protocol) to set the time on your servers from an internet time server, don’t think you’re immune. NTP simply syncs your internal UTC (universal time) clock with a UTC clock on the internet. Your timezone tables then determine your actual local time, based on your UTC offset, which changes during daylight savings time.

Updating ColdFusion’s JVM is very easy. The version of java that ColdFusion ships with is 1.4.2_09. You can see this if you login to your CF Administrator, then click on SYSTEM INFORMATION at the top of the page.

CF Administrator - Java details
(more…)

Self-signing your secure certificate - SSL for free

Sunday, February 11th, 2007

Usually to setup an SSL-enabled website (a website available via the secure, https protocol), you purchase a certificate from a trusted authority such as Verisign or Thawte. This costs anywhere from $150-400 per year. But this cost is not always necessary.
(more…)

Snapshot backups

Saturday, December 9th, 2006

I’ve been wanting a way to easily recover a file that is accidentally deleted from one of our websites, either by us or by a client. Also, it would be useful to be able to get back to the state your code was in X number of days ago. For example when the client changes his mind about the current direction you’ve been developing. Source control can offer a solution to some degree, but won’t help you if the client has access to the website and they’ve changed a file. And some shops just don’t use source control for all their projects.

Tape backups also offer a partial solution, I’ve had to pull a file off yesterday’s tape several times. But restoring from tape is a hassle, especially if its stored off site (which it should be!).

Enter rsnapshot. (more…)