De problema com heap, erro win32 487 :
Each Cygwin app gets a special heap area to hold stuff which is inherited to child processes. Eg. all file descriptor structures are stored in that heap area (called the "cygheap"). The cygheap has room for at least 4000 file descriptor structures. But - that's the clue - it's fixed size. The cygheap can't grow. It's size is reserved at the application's start and it's blocks are commited on demand.
For some reason your server application needs all the cygheap space when running under the described conditions.
Uma possível solução pode ser encontrada em Como alterar a memória máxima do Cygwin :
Cygwin's heap is extensible. However, it does start out at a fixed size and attempts to extend it may run into memory which has been previously allocated by Windows. In some cases, this problem can be solved by adding an entry in the either the HKEY_LOCAL_MACHINE (to change the limit for all users) or HKEY_CURRENT_USER (for just the current user) section of the registry.
Add the DWORD value heap_chunk_in_mb and set it to the desired memory limit in decimal MB. It is preferred to do this in Cygwin using the regtool program included in the Cygwin package. (For more information about regtool or the other Cygwin utilities, see the section called “Cygwin Utilities” or use the --help option of each util.) You should always be careful when using regtool since damaging your system registry can result in an unusable system. This example sets memory limit to 1024 MB:
regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1024 regtool -v list /HKLM/Software/Cygwin
Exit all running Cygwin processes and restart them. Memory can be allocated up to the size of the system swap space minus any the size of any running processes. The system swap should be at least as large as the physically installed RAM and can be modified under the System category of the Control Panel.
Não seria difícil garantir que o tamanho máximo do seu arquivo de troca do Windows seja grande o suficiente.
E, a propósito, quanta memória RAM você tem em seu computador?