Sunday, November 27, 2005

Viewing and Adjusting File Descriptor Limits in Solaris 8

Almost a week ago I got an call for problem which is related to log4j and weblogic. Due to some instruction for making an application SOX compliant one devlopment team has intigrated lots of process to be logged through a log4j .
Application is java base and deployed in weblogic. But soon after starting the application and after very few transaction application stopped responding . After a very hard diagonis to catch a real problem we get to know that the poroblem is actually is of File Descriptor. (A file descriptor is a handle created by a process when a file is opened. A new descriptor is created each time the file is opened. It is associated with a file object which includes information such as the mode in which the file was opened and the offset pointer where the next operation will begin. This information is called the context of the file. File descriptors are retired when the file is closed or the process terminates. Opens always choose the lowest-numbered file descriptor available.)

On Solaris, each user account has a certain limited number of file descriptors. Use the ulimit command to print or set resource limits. A resource limit is a pair of values that specify the current (soft) limit and the maximum (hard) limit. You can modify the hard limit in /etc/system. You must reboot your machine anytime you modify /etc/system.

Note: Do not change the default soft limit. It has the potential to affect many processes on the server and will not affect WebLogic Server.

You must have adequate permissions to use the ulimit command. Any user may lower a hard limit. Only a super-user may raise a hard limit.

To view and adjust file descriptor limits:

1. Use the ulimit command to print current resource limits.

2. Set the hard limit value in /etc/system, according to your needs. For example:
set rlim_fd_max=4096 /* hard limit */

3. Restart WebLogic Server.
A message will appears in the startup log.

SightQuest : Computer Security - Antivirus aides, virus threats, online protection, patches, and information.

1 comment:

web hosting domain name registration said...

Hey how are you doing? just letting you know that someone from Central America read your blog!
This is my site:
web hosting domain name registration