Memory error during the receive phase of ConnTrans
[comm-station] [COMMSTATION] [Memory error] [Virtual Private Networ] [VPN]
Symptom
When you run ConnTrans, you get the following error during the receive phase.
‘Receive Next’ Call to Communication Station/CRM Server failed with 8007000e.’Receive Next’ Call to Communication Station/CRM Server failed with 800706be.Other terms
Memory error, CommStation, comm-station, VPN, Virtual Private Network, 8007000e, 800706be, Bulk Download, Initial Load, ConnTrans
Reason and Prerequisites
Errors and meaning:
The error 8007000e means that there is no enough memory on the system to receive the message send by the CRM server. This is the reason why the recieve is taking much time and is failing in the end.Error 800706be means that the active connections are killed by the server that aborts a connection. This causes the client to kill all connections that are associated with the remote port. This might be caused because the connections are getting timed out due the the large size of the messages coming from the CRM Server. This error is commonly observed in VPN connections or in networks with a small bandwidth.
Reasons:
Your computer RAM does not have enough free space.Virtual memory of your system is too low.The incoming messages are too bulky to be accepted by your system.Some other heavy applications that consume a lot of memory are running on your system.
Pre-requisite:
Mobile Client should be installed and running.ConnTrans is initializing and authenticating.Solution
This problem might be occuring because your computer RAM does not have enough free space (not the hard disk free space) to accept the incoming messages, due to one of the following reasons.
The incoming messages are too bulky.One or many heavy applications that consume memory are running on your system.
Follow the steps in the right sequence to analyse the problem. Run conntrans after each step. Move to the next step only if the recieve is failing and the recommendation mentioned in the step has no effect. For example, if step (1) is not helping and the ConnTrans is failing in recieve phase with the same memory error, then proceed to step (2).
STEP 1: Increase the usable memory in the System
Free as many processes and unwanted programs running in the Mobile Client, so that the ConnTrans application gets more of the RAM at its disposal.
Increase the virtual memory of the system: (Win XP).Right-Click on the My Computer and take the properties.Click on the ‘Advanced’ tab.You can see a small area named ‘Performance’.Click on the ‘Settings’ button.Navigate to the ‘Advanced’ tab.You can see a small area named ‘Virtual Memory’.Click on the ‘Change’ button and increase the virtual memory paging to a bigger value (ideally 1024 – 2048 MB depending upon the free space in the system).Click on the ‘Set’ button and set the new changes.
If the memory image of the SQL Server in the system is too high, then you need to configure the SQL memory settings to use fixed memory than growing memory. Configure the fixed memory size to half of the system RAM. This can be done using the SQL Enterprize Manager as follows.Right click on the Registered SQL ServerClick on properties.In the Memory tab, set to use Fixed memory.
STEP 2: Enable ConnTrans to wait longer for the messages from the CRM Server.
The following settings are used mostly when you are using a VPN connection.
Locate the registry keyHKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters.Create the entries if not present. These parameters determine the amount of time in which ConnTrans or any application using TCP waits for a response from the remote application. The value that you create for the aforementioned keys should be greater than the default values.KeepAliveInterval
Value Type :REG_DWORD – Time in milliseconds
Valid Range:1 – 0xFFFFFFFF
Default :1000 (one second)
Description:
This parameter controls the interval that separates keepalive retransmissions until a response is received. After a response is received, KeepAliveTime, again controls the delay until the next keepalive transmission. The connection is aborted after the number of retransmissions that are specified by TcpMaxDataRetransmissions are unanswered.KeepAliveTime
Value Type :REG_DWORD – Time in milliseconds
Valid Range:1 – 0xFFFFFFFF
Default :7,200,000 (two hours)
Description:
The parameter controls how frequently TCP tries to verify that an idle connection is still intact by sending a keepalive packet. If the remote computer is still reachable and functioning, the remote computer acknowledges the keepalive transmission. By default, keepalive packets are not sent. A program can turn on this feature on a connection.
TcpMaxDataRetransmissions
Value Type :REG_DWORD – Number
Valid Range:0 – 0xFFFFFFFF
Default :5
Description:
This parameter controls the number of times that TCP retransmits an individual data segment (non-connect segment) before it aborts the connection. The retransmission timeout is doubled with each successive retransmission on a connection. It is reset when responses resume. The base timeout value is dynamically determined by the measured round-trip time on the connection.
For more details on the parameters, refer to the MSDN documentation.
STEP 3: Reducethe number of messages to be recieved by the Mobile Client in a single call to the CRM Server.
Transfer rate is the number of messages fetched per call to the CRM Server by the ConnTrans application. The default number is 20. This number can change as ConnTrans dynamically calculates the number of messages it can pull down in a single call. If the size of the messages to be downloaded is huge, then this call might fail for the bulk. It is then better to try to download one BDoc message per call to the CRM Server.
For CRM releases 4.0 and below, locate the registry keyHKLM\SOFTWARE\SAP\MSA\TransferService\Parameters\.Locate the registry entry ‘TransferRate’ in this registry folder. Create the entry if not present.For CRM releases 5.0 and higher, locate the registry keyHKLM\SOFTWARE\SAP\MSA\NewTransferService\Parameters\.Locate the registry entry ‘NumMsgToPull’ in this registry folder. Create the entry if not present.Change the value of the registry entry to ‘1′.Re-start ConnTrans if an error occurs. If the error repeats for the first message received, then it means that even one message that is sent by the server is HUGE.
STEP 4: Analyze the CommStation.
Shut down all other memory consuming applications in the CommStation and run Conntrans. If ConnTrans works it means that this error is due to other applications having a HUGE memory image in the CommStation.Check whether you have installed CommStation on a machine with SAP recommended specifications.The ConnTrans application connects to the CommStation for connection pooling to the CRM Server. When there are many simulataneous connections the CommStation application uses much system resources. Hence any other resource oriented/memory consuming applications running on the CommStation can hinder its performance.
STEP 5: Reduce the size of a single BDoc message to be downloaded.
The size of even a single instance of the BDoc is huge mostly during two cases.
The first case is during the initial load scenario when several huge instances of a BDoc is contained in one single BDoc message. The the size of a single BDoc message created during Initial Load can be reduced by reducing the number of instances that is contained in this message.Find the BDoc which is having the huge size.Using the transactionR3AC6, navigate to the ‘Display View “Middleware Parameter”: Overview’ page.Check for the Paramname ‘MAX_PACKAGE_SIZE’ for which the field paramval will have a default size (say ‘n’). Default size of each BDoc message is specified in the entry
Key : RRS_COMMON
Paramname:MAX_PACKAGE_SIZE
Paramname2 : <Empty>
Paramval : n
This means that during initial load a single message of any BDoc type fetched by the Mobile-Client will have ‘n’ number of Root Elements. Do not change this field. Normally the default packet size contains 50 root elements).You can make an additional entry for the your BDoc having the huge size. This can be done as follows
Key : RRS_COMMON
Paramname:MAX_PACKAGE_SIZE
Paramname2 : <The Short Name of the BDoc with huge size>
Paramval : <Specify a size less than 50>For the ‘Paramval’, it is adviced to find the optimum package size by performing a trial and error. The packet should be small enough to be transmitted via your network and big enough to contain the maximum number of root segments. If you do not specify a BDoc name in the Paramname2 field, the packing of all the newly created messages will be changed for all BDoc types.The number of messages in the queue will be increased. The packet size of a BDoc message is directly proportional to the number of BDoc instances in a BDoc message. Hence if the message size is reduced to half, the packet size reduces to half the actual size. When the packet size reduces by half, the number of messages in the queue increases becomes double.Delete the outbound queue in the CRM Server for this site.Perform an extract again for this BDoc to effect the new change. The new messages for the particular BDoc will be packed according to the new parameter entry ‘Paramval’.The second case is when a single BDoc message dispatched to the Mobile Client by a change in the CRM Server (Delta Message) contains a huge attachment which cannot be processed by the Mobile Client. Such an occurrence is very rare because the network is considered to be the weakest link in the whole process and any BDoc reaching the Mobile Client should be processed by ConnTrans application. But in an unfortunate occurrence of such a scenarionEnsure that you have applied the corresponding HOTFIX notes for your release on the CommStation and the Mobile Client for better memory handling.