Seem unable to change Telegram API timeout value from 30 seconds
Closed this issue · 2 comments
I have been having an issue with one of my security cameras sending email to telegram. It is located on a slower link and I believe it is likely the size of the image attachment that is taking longer than 30 seconds to be sent.
The error presented in the log is:
{"error":"`read tcp 172.30.0.3:2525->192.168.1.59:47044: i/o timeout","level":"warning","msg":"Error reading data","time":"2024-04-02T18:35:20Z"}
A screenshot showing from the initial connection to the error.
- I have attempted to pass an environment variable using: ST_TELEGRAM_MESSAGE_TIMEOUT
- I have also changed the value in a local copy of the smtp_to_telegram.go code and built a local docker container using it
- Changing the value makes no difference the timeout occurs always after 30 seconds each time.
Am I missing something?
Thanks.
The http client timeout indeed limits the time allowed for the client to upload a file. But increasing it should help. Perhaps, it didn't work for you because of a name mismatch? You mentioned that the variable you passed is called ST_TELEGRAM_MESSAGE_TIMEOUT
, while the daemon actually reads it from ST_TELEGRAM_API_TIMEOUT_SECONDS
instead.
Oh, you are right, there seems to be a 30s default timeout on the SMTP server's side as well. Should be fixed now with dcb7052