question

tjyads avatar image
tjyads asked

Cannot stay connected to a server

I am using Mirror and Telepathy for server connection and am having trouble keeping a player connected. The server should be hosted by playfab and does not have any player act as a host. when i use the LMA to test connection the server reaches active just fine and the player connects to it based on the info for local debugging, after around a minute the player will disconnect every time even though the server is still running on Powershell. when i made a build on playfab i was able to get the same result before but now i am unable to even connect on the server build, the closest i have gotten is to get a server active when it uses UDP 8080 but the client cannot connect to it at all.

Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

We recommend that you use LMA locally to ensure that your server build is working properly before deploying it to PlayFab MPS.

What is the NumHeartBeatsForTerminateResponse of your LMA setting? If you are using default value, you can increase it to a large number to see if the issue persists. If the player still disconnects from the server, you may need to add some debug code on both client and server project to see what the cause could be. You can also use MpsSamples/UnityMirror at main · PlayFab/MpsSamples · GitHub to do some tests.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tjyads avatar image tjyads commented ·

heart beats is at sometime like 600. the most recent LMA test i ran and all prior seem to have an issue shown in the logs that I'll show below.

2023-06-20T16:02:34.1386273Z CreateDirectory '' failed: The system cannot find the path specified. 2023-06-20T16:02:34.1390537Z
2023-06-20T16:02:34.1394785Z (current dir: ) 2023-06-20T16:02:34.1406819Z CreateDirectory '' failed: The system cannot find the path specified. 2023-06-20T16:02:34.1411213Z
2023-06-20T16:02:34.1416040Z (current dir: ) 2023-06-20T16:06:08.5590080Z Cannot send heartbeat: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

it happens early and immediately after gameport was found in GSDK Config Settings. I'll check my settings in LMA to see if i can solve that issue.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.