sissbruecker / linkding

Self-hosted bookmark manager that is designed be to be minimal, fast, and easy to set up using Docker.
MIT License
5.36k stars 263 forks source link

Hardcode the default request timeout #644

Closed ronau closed 3 months ago

ronau commented 4 months ago

As described in Options.md, the default value for LD_REQUEST_TIMEOUT is 60. However, when you have something like this in your .env file

# Configures the request timeout (in seconds) in the uwsgi application server. Default: 60
LD_REQUEST_TIMEOUT=

then the variable's value will be unset (or null?). In this case, uwsgi http-timeout seems to be considered zero, which will result in every request being dropped.

Using bash variable expansion rules, the default value 60 can be set as fallback.

sissbruecker commented 4 months ago

Can you clarify how you ended up with a configuration like this? The setting is not in the .env sample file so you will not end up with this configuration if you start from there.

If it's unlikely that someone runs into this issue, I'd prefer not to do anything about it actually. Instead the setting should probably rather be removed, it doesn't really serve a purpose IMO. Originally the bookmark import was very slow, so that request could take longer than a minute, but now I can't think of any use-case where a request might take that long. Well, maybe if you're doing something crazy with the API.

ronau commented 4 months ago

I tend to write my own .env files when incorporating new tools into my homelab collection. 😉 I usually include all the environment variables supported by the container, so that I can look them up easily right in the env file. So yes, the problem is kind of my own fault. However, I think it makes sense to mention in the documentation that this value always must be an integer value.

If you think removing the setting entirely instead makes sense, then of course this is obsolete.

sissbruecker commented 3 months ago

Thanks, for now I think I'll leave things as is. If this happens more often we can reconsider.