0
\$\begingroup\$

I'm making online game with Photon and Unity. It was working fine, but suddenly players are disconnected without any warning or errors.

It just happens sometimes fast, sometimes slow, but always happened.

Before user disconnected, it seems it's little laggy and soon player disconnected.

So I changed the log level to all, and saw this message was printed right before player disconnected.

DisconnectByServerLogic current State: Joined

What is meaning of this? I changed Photon App to new one, but didn't worked. I spent hours to figure out why this is happening, but no progress.

There is only one part that disconnects player, it's event function that invokes user pressed exit game, but it never called and there is no more function that disconnects.

If this causes from my code, I can fix it, but there is no code for disconnect and also there is no information why user keep disconnected.

Only information that I found was just above message but I don't know what that means. Is that mean Photon forcely disconnects player?

I'm stuck here in almost day but I couldn't find any problem in my code.

I'm using Free photon plan, and result of analysis:

  • 4 CCU
  • 1 Rooms Max(I don't know what this means)
  • 15,558 Msg/s per Room Max
  • 895.0 MB Bandwidth
  • 0 Rejected Players

If someone who knows this problem, it will be very appreciate it gimme some advice. Thanks.

\$\endgroup\$
0
\$\begingroup\$

This problem was caused by too many data transmission, so Photon forcely closed it's connection.

Reducing data transmission size solved this problem.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.