SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 17390: SAS® Stored Process Server problems occur when processing user-written Java or .NET requests that do not close the connection

DetailsAboutRate It

When processing requests submitted by a user-written Java application or .NET application, the SAS Stored Process Server might experience performance problems if the user application does not close the connection to the SAS Stored Process Server.

If the client application submits a request but does not close the connection to the SAS Stored Process Server, the request will continue to occupy SAS Stored Process Server resources. The SAS Stored Process Server log file will indicate that the cost continues to steadily increase. For example:

STP: Sending cost=101 to Load Balancer. tkStat=0 STP: Sending cost=202 to Load Balancer. tkStat=0 STP: Sending cost=303 to Load Balancer. tkStat=0 STP: Sending cost=404 to Load Balancer. tkStat=0 STP: Sending cost=505 to Load Balancer. tkStat=0
When the total cost for your SAS Stored Process Server reaches the Maximum Cost setting, the SAS Stored Process Server will stop processing requests.

You will also notice that your SAS Stored Process Server log will not contain any Context Close messages (which indicate that the connection to the client application was closed).

When your SAS Stored Process Server cluster is full and cannot process any more requests, the following error message will appear in the Object Spawner log file:

   ERROR:   The Balance algorithm timed out before a server could
            be found.
   WARNING: The load balancing instance ldblCompRefDirectConnection
            call failed.
   WARNING: Unable to redirect the client request.

Your SAS Stored Process Server log file might contain ERROR messages such as the following (which generally mean that the client disconnected from the SAS Stored Process Server):

   ERROR: The tcpSockRead call failed. The system error is
          'The connection was reset by a peer'.
   NOTE:  Bridge protocol engine socket access method failed to
          read from socket, error 10054 (The connection was reset
          by a peer).

If you experience this behavior, you should modify your client application code so that it closes the connection to the SAS Stored Process Server.

For more information, see Sample 26054: "Executing a stored process defined in metadata using locally deployed foundation services".

Note that the destroy() method in the Java code is used to close the connection. When writing Java code, you must have the following two statements, in this order:

   spExecution.waitForCompletion();

   spExecution.destroy();

You must have these two statements for every path out of the code, including exceptions. Both statements are essential.

The following modifications might also help delay this problem. Change the Maximum Cost Load Balancing value for your SAS Stored Process Server from its default value of 1000 to 500 and change the Cost Per Client value from its default of 100 to 1. These options are accessible from the Server Manager in your SAS® Management Console. Select the Options tab on the property sheet for the stored process logical server.

To change the Maximum Cost Load Balancing value:

  1. Select Server Manager ►SASMain►"SASMain - Logical Stored Proess Server" ►"SASMain - Stored Process Server"►Properties. ►Options►Advanced Options►Load Balancing Properties.
  2. Change the Maximum Cost value from 1000 to 500.
  3. Under Shutdown Inactive Servers check the Inactivity Timeout box and specify a value for Inactivity Timeout.
  4. For example, if you specify a value of 60, your Stored Process Servers will shut down after 60 minutes of inactivity. The servers will be refreshed when they start up again.

To change the Cost Per Client value:

  1. Select Server Manager►SASMain►"SASMain - Logical Stored Proess Server" ►Properties►Load Balancing.
  2. Change the Cost Per Client value from 100 to 1.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS Integration TechnologiesMicrosoft Windows XP Professional9.1 TS1M3 SP1
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP1
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP1
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP1
Microsoft Windows NT Workstation9.1 TS1M3 SP1
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP1
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP1
Microsoft Windows 2000 Professional9.1 TS1M3 SP1
Microsoft Windows 2000 Server9.1 TS1M3 SP1
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP1
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP1
64-bit Enabled Solaris9.1 TS1M3 SP1
64-bit Enabled HP-UX9.1 TS1M3 SP1
z/OS9.1 TS1M3 SP1
HP-UX IPF9.1 TS1M3 SP1
Linux9.1 TS1M3 SP1
Linux on Itanium9.1 TS1M3 SP1
OpenVMS Alpha9.1 TS1M3 SP1
64-bit Enabled AIX9.1 TS1M3 SP1
Tru64 UNIX9.1 TS1M3 SP1
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.