-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Too many open files #2538
Comments
This is expected after the option I also wrote, how to prevent the crash: "It would be better to implement task canceling when they aren't needed anymore. RawConnectionHttp has close() method, but it does nothing now, because the code doesn't keep track of active tasks". |
Ah got it! thought open files != tasks and assumed it was a separate issue. That said, when this occured, user is both online and with stable connectivity. |
This is a real issue for watchOS devices, so it can be kept opened. |
By the way, I realised it always spams tons (like 1000s in span of 20 minutes) of In one test example I observed the Yet, it seems if I manage to keep tdlib busy, such as if I'm requesting a bunch of stuff, the rate of which the error "socket is empty"'s appearance, appears to be lessen. Any relation to the mentioned issue as well? |
This is related to the crash. The line in the log is printed when a new "connection" is created. A new connection is created when the previous connection is dead. i.e. requests to the connection received no response. In this case the connection is closed and a new connection is created. But when |
Right, I retested it with the master branch build without any patches, and while getting 332 'socket is empty' errors in a short span of 4 minutes, there were only 34 instances of |
The commit b73061f should make things slightly better. Basically each task can at max last for 90s before timeout. |
I left my simulator running on my Mac for a while, and came back to a SIGABRT crash as well as this final console message:
�[1;31m[ 0][t 4][1689493045.501645088][EventFdBsd.cpp:44][#1][!ConnectionCreator][&err == -1] [PosixError : Too many open files : 24 : socketpair failed]�[0m
Judging from it, I guess it has something to do with file descriptor limits imposed by the OS, which for macOS is 256. (Unsure what it is for watchOS)
No, I could not reliably replicate this, and there could be a high chance that it's my fault, but thought I would open this nonetheless, in case its a real concern.
Usage observed on watchOS, latest master + #2501 + #2517
The text was updated successfully, but these errors were encountered: