rubenlagus / TelegramApi

Java library to create Telegram Clients
MIT License
297 stars 108 forks source link

Too many Connections(Too many Open Files) #40

Open semsimsom opened 7 years ago

semsimsom commented 7 years ago

Thanks for this great tool. When I use kernelComm.getDownloader() Or kernelComm.getUploader() to download or upload a file, it works great But after sometime which the program is still open, I encountered the Too Many Open Files(After about one day). I investigate it and it appears to get new connections even if i do not use any call method. lsof shows list of new opened files about 2000 each day. lsof -p xxx |wc -l Most of the open files are FIFO (probably stream whiteout close!?) Also,netstat shows many new connection to telegram(ESTABLISHED connections). netstat -an | egrep '91.108.4.182|149.154.167.91'

semsimsom commented 6 years ago

Hi there. I tried using this api without calling any method. I only Login once and the problem still exists. It slowly get new connections and does not release old ones. I encountered another problem, too. After some time, it revokes and delete my session and I need to login again!

mdhak83 commented 4 years ago

I'm trying to take over from Ruben's code here : https://github.com/mdhak83/javaGram