#3185 closed task (fixed)
Limit connection limit of moved trac instances
Reported by: | robe | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Sysadmin Contract 2024-I |
Component: | SysAdmin/Trac | Keywords: | |
Cc: |
Description
trac appears to be suffering from some bot attacks of late eating up connections.
I think many of these strk observed were to sites no longer used.
For now, I'm going to limit the number of connections of these defunct site databases to 5 connections max.
Change History (17)
comment:1 by , 7 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 4 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
@robe would you mind increasing the connection limit for the 'trac_gdal' instance? (the BuildHints wiki pages are still actively maintained, read, and modified, by GDAL's packaging community - really, these old steps are a lifeline for packagers).
Almost every page load gives the error:
Unable to get database connection within 0 seconds. (OperationalError: FATAL: too many connections for database "trac_gdal" )
comment:4 by , 4 months ago
I've run this:
ALTER DATABASE trac_gdal WITH CONNECTION LIMIT = 10;
Is that enough, Jeff ?
comment:5 by , 4 months ago
Component: | SysAdmin → SysAdmin/Trac |
---|
comment:8 by , 4 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:10 by , 3 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hi,
I am getting errors like this on the MapGuide and FDO instances (replace trac_mapguide
with trac_fdo
where applicable)
Trac Error TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TimeoutError: Unable to get database connection within 0 seconds. (OperationalError: FATAL: too many connections for database "trac_mapguide" )
I am actively maintaining wiki content and tickets on both instances and use the timeline feature heavily to monitor commits from Autodesk for merging and the above error is appearing way too frequently.
Could we get the limits increased on these 2 instances?
comment:11 by , 3 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I've upped the limit of trac_fdo to 30. trac_mapguide I had already upped to 30 as part of #3244
Replying to strk:
Should we use pgbouncer ? https://www.pgbouncer.org/
Yah was thinking that and I thought I had added a ticket for this, but can't find it. Anyway I'll add one and detail my findings which sadly is not good.
comment:12 by , 3 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
@strk can you also up the limit for "trac_gdal" to 30? (the error is back).
comment:14 by , 3 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Jeff, limit raised to 30:
trac_gdal=# ALTER DATABASE trac_gdal WITH CONNECTION LIMIT = 30; ALTER DATABASE
follow-up: 17 comment:16 by , 3 months ago
I've also raised trac_mapguide to 30 as the log was full of TimeoutErrors about it
comment:17 by , 3 months ago
Replying to strk:
I've also raised trac_mapguide to 30 as the log was full of TimeoutErrors about it
I had raised it already to 30 per #3244. Maybe we need to raise it more that 30 is not enough.
ran this
there are others but will start with these. At the moment there seem to be no active connections and inactive connections are as follows: