-
Notifications
You must be signed in to change notification settings - Fork 178
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
TIMEOUT I'm using version 2.6.13 #302
Comments
cpu-profile-6942-20220420-174229.cpuprofile.zip |
is that the only code you're using? can you send a small reproducible code ? |
Sorry, I can't reproduce this problem locally, but I can provide a development environment server, you can connect to the development environment server to view this error |
This problem has been bothering me for a long time, I hope you can provide telegram contact information, I will send you the ip of the development environment server, you can connect to the server to see the log |
timeout is not a network connection timeout, Some connections will have a timeout, but there is no problem with the network
gramjs/gramjs/client/updates.ts Line 258 in b6b46c8
|
You can find me in https://t.me/gramjschat |
There are updates on this topic? |
The latest version should have had some fixes for this. |
Hi guys. I'm using version 2.17.4 and still getting timout on error log. Error: TIMEOUT |
my code:
this code is executed every minute by a cronjob. |
I'd have the same problem, I think this is a Gram js bug, and I hope that will be fixed in the next version |
for this error (Error: TIMEOUT go to this file (updates.js) line 244 and remove await before the promise. enjoy! |
I don't think is good for production this... |
I've upgraded to 2.19.10 and I'm now facing this, I don't think I had the issue in 2.17.4 |
Is there any way to avoid this error being logged? |
I am also facing same issue on v2.20.15 |
For anyone having Error: TIMEOUT spam problem: You can disable all logs using And to actually be able to handle the errors instead of only getting them spammed, define your logger function and assign it to the client: // Define the error handler function:
async function errorHandler(error) {
if (error.message && error.message == 'TIMEOUT') {
//Do nothing, as this error does not make sense to appear while keeping the client disconnected
} else {
console.error(`Error occurred for API ID ${this.apiId}:`, error);
// Handle other types of errors
}}
//Assign this handler to client:
client._errorHandler = errorHandler You can not keep info/warn logs with something like So to keep info/warning logs, you need to re-define the log levels array:
Thus, the result is that you still get all the other logs while errors can actually be handled. |
Version 2.6.13 the same problem occurs, A large number of timeouts will occur in the program running for a long time, which will eventually lead to 100% of the CPU and the server cannot be used.
The text was updated successfully, but these errors were encountered: