Consultor Eletrônico



Kbase P149488: Server Socket periodically stops processing data for some connected clients
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/23/2009
Status: Unverified

SYMPTOM(s):

ABL program acts as a server using sockets

Program receives XML files, parses them and does appropriate processing

Program scans received data for specific strings which delineate the end of the message

Program randomly stops processing (socket waits forever for more data)

No error messages are displayed

Problem seems to happen when the amount of data sent from a client is between 8,200 and 8,900 bytes

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems

CAUSE:

The READ-RESPONSE handler was assuming that the text string which marked the end of the message would always be contained in its entirety in a single READ-RESPONSE handler. This assumption is false. There is no guarantee at all as to how much data will be available during any given READ-RESPONSE handler.

FIX:

Modify the program to take the available data in the READ-RESPONSE handler, append it to the previously read data for the same client then scan that complete data for the text string which marks the end of the message