CFML and Cannot run program “chmod”: java.io.IOException: error=24, Too many open files

Migrating one of my customers the other day, bought up an ugly error when I had to create 2000 directories on one go. The error was:
[code]Cannot run program "chmod": java.io.IOException: error=24, Too many open files[/code]
While, “too many open files” usually means one can raise the limit of open files under Linux (check out ulimit -a) it unfortunately did not help in this situation. I even rebooted the whole server and made sure that no other service was running, except Java that is. Still no success.
I then looked at my code in the CFML (Coldfusion) template. In order to create the directories I used a simply:
[coldfusion]<cfinclude action="create" directory="…" mode="775">[/coldfusion]
Normal code, right? Well, as it turns out, I simply had to remove the “mode” part in order to overcome this error. Not sure, why this caused a “too many open files” error, but it worked in my situation. I can only imagine that the server tried to put all 2000 directories into memory and then write them in one go (I have a high value for the open files limit set and 12GB RAM).
In any case, hope this helps someone out here.

Setting the correct Java version under MacOS X
My favorite scripting language is CFML, or as some know it as ColdFusion. I like it because it is very very powerful, easy to use and can do just about everything your xyz language can do. For many years, ColdFusion was a closed sourced system, where the former Macromedia and…

ImageMagick and Ghostscript playing nice with web applications
I had to spent way too much time the last time to set up ImageMagick and Ghostscript together that I simply jump right in so you don't have to waste time on this, like I did. Creating thumbnails and images from a PDF is one of the most used features…

Why Coldfusion / CFML has its place and is worth to learn it
I actually never indulge in conversations why one programming language is better then another, because what is right to you, does not automatically mean, it is right for someone else. So, for me ColdFusion, or as we call the language itself - CFML, works very well. Nevertheless, in this post…

How to create a virtual machine server image from a physical CentOS server
I run a couple of servers over at a server farm. All of those machines run VMWare ESX, so today I wanted to move my last physical server to a VMWare image. If you want to convert a physical Windows machine then your task is quite easy. Start up the…

Git unable to resolve reference and unable to update local ref messages
I've recently had an error of: [code]error: unable to resolve reference refs/remotes/origin/...[/code] while doing a "git pull". Since I've never seen this one before, I've turned to the net for some resolutions. According to many one has to do either a: [code]git gc --prune=now[/code] or a [code]git fetch[/code] Whatever I've…

Updating Confluence and Jira is a nightmare and keeps you hunting for solutions
First off, I really like Jira and Confluence and we have been using them successfully for all our open source applications. We also use HipChat for our IM communication and use SourceTree for managing code on Github. Just realised that Atlassian has become a company to depend on... This post…