>>>If you want high reliability on old computers, it's a good idea to have some sort of official protocol for evaluating them in case of problems e.g. check power incidents logged by UPS monitoring software, Windows Event logs, periodic dust vacuuming etc.
>
>In this case it's a VM on a Server2008 machine - but we've seen the freeze at more than one customer now.
>
>FWIW I've checked the code and can see one possible issue in the code downloaded from the VFP wiki- basically the message is added byte by byte into an object property which has to assign a new block of memory for the entire message as each byte is received rather than using textmerge or adding into a memo field. Some of these messages are large. Perhaps VFP is pushed to a garbage collection state mid-process so perhaps the accept times out or the termination character is mishandled so it waits forever. Certainly worth a refactor to use textmerge or memo.
re :is added byte by byte into an object property which has to assign a new block of memory for the entire message as each byte is received rather than using textmerge or adding into a memo field
For building strings, adding byte per byte
If it's an object property - it will start getting (very) slow as the string expands
There are some alternatives
(1) fcreate/fwrite/....
(2) HeapAlloc/HeapReAlloc/HeapFree together with sys(2600)
(3) Use an ado stream
http://msdn.microsoft.com/en-us/library/ms675032(v=VS.85).aspxor start with a property and switch to one of the above when its length reaches a certain size
If it's byte per byte, (1) is the fastest
Gregory