mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Rate-limit "too-many-sockets" messages; they can get needlessly verbose.
svn:r16480
This commit is contained in:
parent
60a0ae198d
commit
30422b5df1
@ -18,6 +18,10 @@ Changes in version 0.2.1.5-alpha - 2008-08-??
|
|||||||
when building against recent kernels. Bugfix on 0.1.2.1-alpha.
|
when building against recent kernels. Bugfix on 0.1.2.1-alpha.
|
||||||
- Add a missing safe_str() call for a debug log message.
|
- Add a missing safe_str() call for a debug log message.
|
||||||
|
|
||||||
|
o Minor features
|
||||||
|
- Rate-limit too-many-sockets messages: when they happen, they
|
||||||
|
happen a lot. Resolves bug 748.
|
||||||
|
|
||||||
|
|
||||||
Changes in version 0.2.1.4-alpha - 2008-08-04
|
Changes in version 0.2.1.4-alpha - 2008-08-04
|
||||||
o Major bugfixes:
|
o Major bugfixes:
|
||||||
|
@ -762,8 +762,8 @@ warn_too_many_conns(void)
|
|||||||
{
|
{
|
||||||
#define WARN_TOO_MANY_CONNS_INTERVAL (6*60*60)
|
#define WARN_TOO_MANY_CONNS_INTERVAL (6*60*60)
|
||||||
time_t last_warned = 0, now = time(NULL);
|
time_t last_warned = 0, now = time(NULL);
|
||||||
|
int n_conns = get_n_open_sockets();
|
||||||
if (last_warned + WARN_TOO_MANY_CONNS_INTERVAL < now) {
|
if (last_warned + WARN_TOO_MANY_CONNS_INTERVAL < now) {
|
||||||
int n_conns = get_n_open_sockets();
|
|
||||||
log_warn(LD_NET,"Failing because we have %d connections already. Please "
|
log_warn(LD_NET,"Failing because we have %d connections already. Please "
|
||||||
"raise your ulimit -n.", n_conns);
|
"raise your ulimit -n.", n_conns);
|
||||||
last_warned = now;
|
last_warned = now;
|
||||||
|
Loading…
Reference in New Issue
Block a user