Out of memory in standalone enqueue server

[] [] [] []

Symptom
One of the dev_enqio_* trace files of the standalone enqueue server (part of the SCS or ASCS instance) contains traces of the type:
*** ERROR => IOThread::createRequest: failed to create enqueue request [eniothread.c 783]
Exception text: <EnsMemObj: out of memory>
or
send error response to client
*** ERROR => EnqReqClass::initrec: no memory for netdata conversion [ensenque.cpp 952]
*** ERROR => IOThread::WalkNet(): the request failed to initialize correctly: send response to client [eniothread.c 885]
QueuedIORequest:handleFatalError: fatal error on request enqueue request :16363803 with error 103 called

Reason and Prerequisites
Reason:
The standalone enqueue server requires memory in order to accept the client requests (from the AS Java or the ABAP). For performance reasons, this memory is allocated during the start and is only managed at a later stage. The amount of memory can no longer be adjusted at runtime. If there is not enough memory, the system will generate the above messages.
Prerequisite:
When you use the enqueue server in a JEE environment, the enqueue server also requires another internal memory class (see below). As of Release 7.00, you also require this memory class when you use the enqueue server in the ABAP environment.
If a memory bottleneck occurs, the system writes the error messages that are mentioned above into the trace files of the enqueue server. The clients are informed about the memory shortage and they attempt to resend the request after a short break. In the dev traces of the client (ABAP work processes or Java server processes), you can see the relevant messages that state that the enqueue server has an overload situation.
Solution
Despite these messages, the system functions normally. However, they cause performance problems in the system. To prevent performance problems, ensure that the enqueue server starts with sufficient resources.

The profile parameters enqueue/server/max_requests and enqueue/server/max_query_requests (default value: 100) determine how many requests can be processed at the same time in the server.
When you use the enqueue server in the Java environment, both profile parameters should be the same size. The standard value for enque/server/max_requests still may not be sufficient and the system continues to issue the above messages in trace files. In this case, increase both profile parameters.
The situation becomes more complicated if you use the enqueue server together with a replication server in a high availability environment. In this case, you require additional memory resources for the replication. In this case, you must be able to fit the entire contents of the lock table into the memory blocks that are mentioned above (enque/server/max_requests). You can now easily calculate the maximum amount of memory blocks that are required here (see below). However, the replication competes with the normal request processing for memory blocks.
The following should apply as a rule of thumb:
enque/server/max_requests sowie enque/server/max_query_requests are first set to a value so that each ABAP work process or each JEE thread has a block available (for ABAP the default value of 1000 should be enough for enque/server/max_requests, but for JEE, this value may already be too small).For the replication, you must further increase the enque/server/max_requests profile parameter. The value depends on the size of the lock table and on whether you have a Unicode system or a non-Unicode system (note that a Unicode enqueue server is always used for Java systems).Non-Unicode ABAP system: for each MB of the size of the lock table, you must increase enque/server/max_requests by another 20.Unicode ABAP system or Java system: for each MB of the size of the lock table, you must increase enque/server/max_requests by another 25.
You must also refer to the general information about the profile parameters of the standalone enqueue server; this is provided in the online documentation at: http://help.sap.com/saphelp_nw70/helpdata/EN/39/da8d840167402cb39c5920b340bbb6/frameset.htm.
Examples
ASCS:
In a Unicode system with 1000 work processes and a 500MB lock table, you would have the following parameter settings:
enque/server/max_requests = 13500 (1000 + 500 * 25)enque/server/max_query_requests = 1000enque/table_size = 500000
SCS:
In a Java system, four instances are configured; each instance has three nodes that each contain 250 threads. The size of the lock table is 28MB.
enqueue/server/max_requests = 3700 (3 * 4 * 250) + (25 * 28)enqueue/server/max_query_requests = 3000 (3 * 4 * 250)enqueue/table_size = 28000

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment