Skip navigation

Category Archives: Sys Admin

This will be a quick post. Working with a stress test tool, I realized that most of the tests were failing due to the “too many files open” error from the Mac OS X. Immediately figure out that Mac OS X comes with the 256 as the default limit for the number of the files open by a single process. This would be ok for most of the users but what about developers which usually works with a test environment on their own machine?

Launchd is the daemon responsible for managing process. It also controls some of the processes limit information (soft and hard limits for open files, max number of child processes, so on…). The solution is to make use of the launchctl tool from the command line and create the launchd.conf file for the persistent change. Open your Terminal and type the following commands:

sudo echo “limit maxfiles 1000000 1000000″ > /etc/launchd.conf

launchctl limit maxfiles 1000000 1000000

Note for Programmers:

Programs utilizing I/O multiplex or non-blocking I/O on Mac OS X are by default restricted to 1024 file descriptors per process. In order to overcome this limitation you can either re-define FD_SETSIZE macro (before you include <sys/types.h> or to limit the maxfiles to 1024. This will make the warning messages disappear during the compilation time.

Sendmail is probably the worst mail server application ever written. Not even worth to mention that is the award-winner of the TOP-10 buggiest program ever written from decades (I believe that sendmail is #1 on the list). I hate it by heart! I still don’t understand why SUN engineers still supports the sendmail on their Solaris OS. Postfix or Qmail should be used instead (Qmail is the best option but due to license restrictions Postfix can be used). Long time ago I used to work with my Qmail high-availability project (qmail-nmx).

In either case here is my piece of advice when you’re installing Solaris 10: Disable sendmail completely from your system!

In order to help you out with this I am including here the procedures that I always do once got Solaris 10 installed:

# svcadm disable -s sendmail
# svcs sendmail

As output from the last command you should see the following:
STATE [...] FMRI
disabled [...] svc:/network/smtp:sendmail

Done!

Follow

Get every new post delivered to your Inbox.