question

Mathieu Deletrain avatar image
Mathieu Deletrain asked

Multiplayer server 2.0 not able to access external REST API

Hi !

We are in the process of developing a multiplayer game with server hosted on PlayFab using the match maker and multiplayer server 2.0 API.

In an attempt to get sensible information about server crashes, we use the Sentry service to collect crash dumps.


In order to test the feature, I can force the server to crash. Depending on how the server is running I can see two different outcomes :

  • I run a server instance locally, directly from windows -> crash dump is received in Sentry
  • I run a server instance locally, using MockAgent with "RunContainer": false -> crash dump is received in Sentry
  • I run a server instance locally, using MockAgent with "RunContainer": true -> crash dump is NOT received in Sentry
  • I deploy the server to PlayFab, have match maker spawn it using some clients -> crash dump is NOT received in Sentry


It looks like crash dumps cannot exit the container...

It is my understanding that crash dumps are sent using a HTTP REST API so I don't see what could prevent them to be sent by a containerized server except maybe some restriction on network configuration.

Is there something to be configured so that the reports can reach their destination ?


Thanks for your answers !

multiplayerMatchmaking
10 |1200

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

JayZuo avatar image
JayZuo answered

I'm not familiar with Sentry, but if the crash dumps are sent using a HTTP REST API, then there should be no configuration needed. Form Sentry's documentation, it seems you can send messages to Sentry with something like

SentrySdk.CaptureMessage("Something went wrong");

I'd suggest testing with this to see if the network is working.

One thing needs to mention is that while in container, if your main process exits (no matter it's exited as expected or crashed), the container will also exit, all resources will be recycled. Not sure if this behavior will impact Sentry.

You can test your server instance locally with RunContainer": true. If it can pass the local test, there should be no issue after deployed to PlayFab.

4 comments
10 |1200

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

Mathieu Deletrain avatar image Mathieu Deletrain commented ·

Hi,

Thank you for your answer.

As stated above I did the local test using "RunContainer": true and the message is not received by Sentry (while it is when using "RunContainer": false).

One thing I should mention, the game is based on UE4 which has its own crash handler that can send crash dumps to any URL using an HTTP request. It just happens our URL points to Sentry's end point but there is nothing more Sentry related.

Could that be the case the container intercepts the crash and / or stops before the HTTP requests as a chance to exit ?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Mathieu Deletrain commented ·

Thanks for your sharing. Unfortunately, I'm also not familiar with UE4 crash handler. Is it a separate client runs when the main process crashed? If so, then it's possible the container recycled before the HTTP requests were sent by the crash handler.

0 Likes 0 ·
Mathieu Deletrain avatar image Mathieu Deletrain JayZuo ♦ commented ·

I just checked and it happens this is a separate client.

Would it be possible to make the container wait for a list of processes to end before exiting ?

Also, it is now clear there is no issue with REST API called from container, question is resolved :) Thanks again !

0 Likes 0 ·
Show more comments
Mathieu Deletrain avatar image
Mathieu Deletrain answered

[Edit]: Initial content of that message is a completely new question, moved to its own thread...

10 |1200

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

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.