Jump to content
Mustafa Simsek

Datasnap Server doesn't response after awhile?

Recommended Posts

Hi,

 

i have a mobile app, using datasnap server.

 

Datasnap Server : A vcl standalone .exe program. Datasnap server (no rest), DBX and SQL Server connection.

Client : FMX app, Android clients and TClientDataSet.

 

A while before, I have 20-25 clients, there was no problem. But android client numbers increase, 190-200. Server running awhile but about one day later, it didn't response anything. Clients doesn't connect to server. I close and open datasnap server program. Then clients connect and operate again. How could i solve this?

 

object DSServer1: TDSServer
    Left = 96
    Top = 11
  end
  object DSTCPServerTransport1: TDSTCPServerTransport
    PoolSize = 250
    Server = DSServer1
    Filters = <>
    AuthenticationManager = DSAuthenticationManager1
    Left = 96
    Top = 73
  end
  object DSAuthenticationManager1: TDSAuthenticationManager
    OnUserAuthenticate = DSAuthenticationManager1UserAuthenticate
    Roles = <>
    Left = 96
    Top = 197
  end
  object DSServerClass1: TDSServerClass
    OnGetClass = DSServerClass1GetClass
    Server = DSServer1
    Left = 200
    Top = 11
  end

I increase Poolsize to 250. But it didn't solve problem.

 

Thanks.

Share this post


Link to post

Does the server run out of resources?

What does netstat say about client connections?

Does the server cleanup (remove) stale connections?

 

Share this post


Link to post

Which operating system are you using?
For TCP/IP connections, there are limits on the number of available IP ports and the number of concurrent connections. If you have a high connection/disconnection speed, you may run out of available ports as they may all be in the TIME_WAIT state.
But it could also be that the "used" and released ports are not reused "immediately" and therefore the server "stops" when the range of available ports has run out.

 

Look this https://learn.microsoft.com/en-us/answers/questions/482793/tcp-ip-concurrent-connections

  • Like 1

Share this post


Link to post
On 9/9/2023 at 1:00 PM, mjustin said:

Does the server run out of resources?

What does netstat say about client connections?

Does the server cleanup (remove) stale connections?

 

Thanks for answer.

 

1. Server's ram and cpu enough for ds server. There is enough resources.

2. i run "netstat -a" command and see clients. But i couldn't check in error status. is there any other commands to run and check?

3. No, Server doesn't clean up. How could i cleanup stale connections?

Edited by Mustafa Simsek

Share this post


Link to post
On 9/9/2023 at 3:00 PM, DelphiUdIT said:

Which operating system are you using?
For TCP/IP connections, there are limits on the number of available IP ports and the number of concurrent connections. If you have a high connection/disconnection speed, you may run out of available ports as they may all be in the TIME_WAIT state.
But it could also be that the "used" and released ports are not reused "immediately" and therefore the server "stops" when the range of available ports has run out.

 

Look this https://learn.microsoft.com/en-us/answers/questions/482793/tcp-ip-concurrent-connections

Thanks for answer.

 

I use Windows Server 2019 Standard.

 

i'll check the link and TCP/IP connections limit.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×