> > My equipment is new IBM PowerPCs running:
> > - AIX 4.3.3 (patch level?)
> > - xlc compiler 22.214.171.124
> > - Sybase 10.0.2 Server + Client (compiler version used?)
> > Running isql, or executable "X" compiled with DBlib, from the command
> > prompt connects fine. However, some processes fail to connect, and
> > executable "X" fails to connect when another process executes a
> > 'system' call to spawn "X". Which seems odd in the case of this
> > particular executable, for why would it work in one instance and not
> > another??? Environment?
> The environment is copied to a subprocess during a system call,
> so its most likely not that.
It appears as though the environment is NOT copied identically to the
spawned process because the source of the problem is that the number
of file descriptors reported by the process is 4096, and not 2000!
This does not make sense that executables executed from a command
prompt would use the soft default limit, but if the same executable is
spawned by another executable that I start from the same command
prompt and environment, that it would use the hard default limit???
> Mostly likely, that combination isn't certified by Sybase. If
> IBM doesn't provide some sort of guarantee of binary compatibility,
> you'll have your work cut out.
> > The errors that I receive are:
> > - SQL Server connection failed.
> > - Operating system: Bad file number
> > OR
> > - Db-Library error: Unable to connect: SQL Server is unavailable or
> > does not exist.
> > - Operating System error: Bad file number
> You'd need to use a de* or profiler/tracer of some sort to
> work out where it falls over.
> -am ? 2002
Under closed inspection, I chose to confirm both the soft and the hard
limits for the number of file descriptors (nofiles):
HOST> ulimit -a
HOST> ulimit -a -H
Therefore I chose to edit the /etc/security/limits file (which does
not have a default for hard limits) by adding "nofiles_hard = 2000"
and reboot the machine. Now everything appears to be running fine,
but I am trying to confirm whether I may have broken something by
changing the hard limit(?).
# cat limits
* Sizes are in multiples of 512 byte blocks, CPU time is in seconds
* fsize - soft file size in blocks
* core - soft core file size in blocks
* cpu - soft per process CPU time limit in seconds
* data - soft data segment size in blocks
* stack - soft stack segment size in blocks
* rss - soft real memory usage in blocks
* nofiles - soft file descriptor limit
* fsize_hard - hard file size in blocks
* core_hard - hard core file size in blocks
* cpu_hard - hard per process CPU time limit in seconds
* data_hard - hard data segment size in blocks
* stack_hard - hard stack segment size in blocks
* rss_hard - hard real memory usage in blocks
* nofiles_hard - hard file descriptor limit
* The following table contains the default hard values if the
* hard values are not explicitly defined:
* Attribute Value
* ========== ============
* fsize_hard set to fsize
* cpu_hard set to cpu
* core_hard -1
* data_hard -1
* stack_hard -1
* rss_hard -1
* nofiles_hard -1
* NOTE: A value of -1 implies "unlimited"
fsize = 2097151
core = 2097151
cpu = -1
data = 262144
rss = 65536
stack = 65536
nofiles = 2000
* Force all instances of nofiles to 2000
nofiles_hard = 2000