-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not connect to DC 1 in MadelineProto/DataCenter.php:300 #1127
Comments
Been able to pretty consistently reproduce this. If I let MadelineProto session sit idle for a day or two and then try a command, it will Exception with the "Could not connect to DC 1". Immediate restart of the process and all is well again. Is there something underlying in the protocol where a client is told it should reconnect (or switch data centers) and MadelineProto isn't doing that or something? Or a situation where Telegram data center's disconnect a client if it's idle for a certain amount of time (and MadelineProto assumes it's still connected)? Have been thinking about working around it by catching the exception, but can't really do that because it seems you can't completely teardown an API to restart it because the settings files keep being written to even after the API class is torn down. See this: #992 MadelineProto being unable to connect to the data center (until the API is restarted) for whatever reason seems like something that should be caught and handled in MadelineProto itself. |
What do your full logs say? |
The log immediately before the part I posted is this:
The last 2 lines from this is the first two lines of the portion in first post. The lines that start with "MadelineProto[0]:" is the daemon logging the method it's sending to MadelineProto. If you need a different logging level, let me know... can set that and wait a couple days to get a more verbose log. |
I need the MadelineProto.log file here |
Here's what it has currently... looks like it's probably truncating itself, so not sure if the right part is in there. If you'd like me to set different logging level or parameters for the log, let me know. |
Should be fixed in the latest version of MadelineProto, if not please open a new issue. |
Have been running into this a few times a week. It just happened again with a simple method call (getSelf) and the whole thing came crashing down with the exception.
I've set the process up to restart automatically and it instantly works when the process restarts, but it seems like it shouldn't need to be restarted like that.
Restarting of the MadelineProto process and the same function/method works as expected.
The text was updated successfully, but these errors were encountered: