IBM Support

SQL statement error number -211, SYSTEM error number -101

Troubleshooting


Problem

Running an application returns SQL error number -211, and SYSTEM error number -101 when it has exhausted the number of file descriptors available for the session.

Resolving The Problem

PROBLEM

When an application opens a cursor, IBM® Informix® Dynamic Server™ (IDS) creates an internal file descriptor for each one. The internal file descriptor is persistent until the application explicitly frees this cursor or the session is closed. The maximum number of file descriptors per session is 32767, however, with internal system tables being opened, this limit is reduced to 32705.



Below is an excerpt of an application which has exceed 32,705 open file descriptors.

Example

SQL statement error number -211

Cannot read system catalog ( systables )


SYSTEM error number -101
ISAM error: file is not open


SOLUTION

If you monitor the output of an onstat -g opn, the column titled isfd is the referenced file descriptor. Below is an excerpt where the problem thread has been isolated.



Example

$ onstat -g opn



tid  rstcb        isfd  op_mode    op_flags   partnum    ucount ocount
 56   0x0afd4118 0     0x00000400 0x00000297 0x00200002 2      2      
 56   0x0afd4118 1     0x00000002 0x00000003 0x00200002 2      2      
 56   0x0afd4118 2     0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 3     0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 4     0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 5     0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 6     0x00000400 0x00000003 0x00200031 32704  32704  
 (...)
 56   0x0afd4118 32701 0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 32702 0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 32703 0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 32704 0x00000400 0x00000003 0x00200031 32704  32704  
 56   0x0afd4118 32705 0x00000400 0x00000003 0x00200031 32704  32704

NOTE: Some of the output shown about is truncated to improve readability. Ellipsis (...) are used to make it more evident.

If you have an application which exhibits this error and the onstat output above confirms this limit has been reached, the application needs to be reviewed and cursors either re-used or freed after being closed. Monitoring an onstat -g opn you can see if particular tables are being opened multiple times, as the same partnum value will appear in column 6.



Important: This is only one possible cause of the problem. If this document does not provide you with a solution to your problem, you should search for other documents that refer to this topic.

[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.0;7.3;9.4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21251537