Skip to content

Commit bc2cac5

Browse files
authored
Merge pull request #235 from OpenGeoscience/asgi-connections
Update DB config for prod ASGI connections
2 parents 635f2e1 + ff26b44 commit bc2cac5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

geoinsight/settings.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class GeoInsightMixin(ConfigMixin):
2828
environ_prefix='DJANGO',
2929
environ_required=True,
3030
engine='django.contrib.gis.db.backends.postgis',
31-
conn_max_age=600,
3231
)
3332

3433
# Override default signup sheet to ask new users for first and last name
@@ -110,6 +109,12 @@ class HerokuProductionConfiguration(GeoInsightMixin, HerokuProductionBaseConfigu
110109
environ_prefix=None,
111110
environ_required=True,
112111
engine='django.contrib.gis.db.backends.postgis',
113-
conn_max_age=600,
114112
ssl_require=True,
113+
options=dict(
114+
pool=dict(
115+
# We have 20 available postgres connections on our service tier, and some
116+
# will be required by the workers and maybe other miscellaneous access.
117+
max_size=12,
118+
)
119+
),
115120
)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
'networkx==3.3',
6262
'numpy==2.2.6',
6363
'pooch[progress]==1.8.2',
64+
'psycopg[pool]',
6465
'pyshp==2.3.1',
6566
'rasterio==1.3.10',
6667
'urllib3==1.26.15',

0 commit comments

Comments
 (0)