community.borland.com

Article #25179: How do I configure semaphore on SCO UNIX

Problem:
Error: statement failed -902 operating system directive semget failed.


Solution:
Example:  
	(settings in /interbase/isc_config)
	
		V4_LOCK_MEM_SIZE        196608
		#ANY_LOCK_MEM_SIZE	98304
		V4_LOCK_SEM_COUNT	96     <---
		#ANY_LOCK_SEM_COUNT	32
		#V4_LOCK_SIGNAL		16	
		#ANY_LOCK_SIGNAL	16
		#V4_EVENT_MEM_SIZE	32768
		#ANY_EVENT_MEM_SIZE	32768

NOTE:	
Default settings in the isc_config file will reflect (32)
 but on SCO we actually use (25).

		(default settings on SCO 3.2.4)
		
			SEMMNS = 60
			
In this case the default settings in isc_config have been 
changed to allocate more semaphores for InterBase and the system
kernel must be tuned to support this.
		
On SCO 3.2.4 the parameters are set in the following file:
		/etc/conf/cf.d/mtune
		
You will want to increase the value for SEMMNS.  
When you change the values in (mtune) they are reflected in
the file (stune).
			
You can use the "configure(ADM)" utility to do this. 
Then after setting new params, use the "link_unix(ADM)"
to rebuild the kernel.		
			
When allocating more system semaphores a general rule 
of thumb is to increase the available semaphores by 
50% each time until the semget errors go away.
			
NOTE:	
You may have to increase the system SEMMSL kernel 
parameter as well.  The SEMMSL's represent the maximum
number of semaphores for each semaphore identifier.

This number should be set to a value greater than or equal 32.

Last Modified: 26-OCT-00