[1.5.0-alpha-test2] No buffer space available

  • Hi


    I recently updated to 1.5.0-alpha-test2, build Fri May 10 20:42:19 2019, bits 64

    This messages started to show up (2 variants).

    Problems seems to come and go away on it's own (I guess we are hovering around some kind of limit)

    Server is receiving images with no error but is not responding to queries while this is happening.

    There are no errors in the postgres log


    Is this 1.5.0 specific ? I've never ever seen this error before

    Code
    20190521 09:50:17 ***Error connecting datasource:conquest user:username password:password
    20190521 09:50:17 *** could not connect to server: No buffer space available (0x00002747/10055)
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?



  • It looks like this is just a coincidence and has nothing to do with the 1.4.x -> 1.5.0 migration.

    From what I understand this is an error related to the OS running out (hitting the user limit?) of ports (sockets?).

    This would explain why the error is showing up and disappearing 'randomly' without my intervention.

    Probably one of the applications going crazy.. hard to say. I'll try to catch it while it's happening and try to confirm this.


    So the bottom line is that it's probably not your fault :)


    [edit] I wonder why it's not happening when receiving images. Just on incoming queries. I guess the receiver is always bound to one static port while incoming queries try to open new port to send the response? Does it make sense? It would explain everything...

  • Hi,


    not sure, database connections are not kept open in either case, so I am a bit baffled.


    However, I ran into a similar issue for mysql, and to fix this there is code in the GUI that does this:


    if Registry.OpenKey('SYSTEM\CurrentControlSet\Services\Tcpip\Parameters', false) then

    begin

    if not(Registry.ValueExists('MaxUserPort') and Registry.ValueExists('TcpTimedWaitDelay')) then

    if MessageDlg('Change TCPIP parameters to fix mysql problems ?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then

    begin

    Registry.WriteInteger('MaxUserPort', 65534);

    Registry.WriteInteger('TcpTimedWaitDelay', 30);

    end;

    end;


    This also had to do with sockets running out. Can you see if manually setting these registry settings for postgres would fix the issue?


    Marcel

  • After much googling yesterday I came up with exactly same answer - this seems to be an OS problem and most popular fix is to set/change those registry values:


    Code
    Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name MaxUserPort -Value 65534 -Force | Out-Null
    Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpTimedWaitDelay -Value 30 -Force | Out-Null
    Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpNumConnections -Value 16777214 -Force | Out-Null
    Get-Item 'HKLM:\System\CurrentControlSet\Services\Tcpip\Parameters' | New-ItemProperty -Name TcpMaxDataRetransmissions -Value 5 -Force | Out-Null

    This was my goto solution. Right now I'm waiting for to problem to occur - I want to catch this while it's happening and see which application is causing this (I expect few thousands open ports or sth like that). After that I'll implement those registry changes and see if it helps.

    I will let you know.


    [edit] unfortunately issue hasn't appeared in past few days so I'm unable to confirm the cause nor test the solution. I'll update this post again if it'll happen again in the future.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!