Skip to content

Instantly share code, notes, and snippets.

View fschiettecatte's full-sized avatar

François Schiettecatte fschiettecatte

  • FS Consulting, LLC
  • Seattle, WA
View GitHub Profile
@fschiettecatte
fschiettecatte / mpm_event_module_small.conf
Last active October 8, 2024 13:30
MPM Event Module Configuration for Small Servers
#
# MPM Event Module Configuration for Small Servers
#
# Small - 4 CPU / 8-16GB RAM
#
# https://httpd.apache.org/docs/2.4/mod/worker.html
# https://httpd.apache.org/docs/2.4/mod/event.html
#
<IfModule mpm_event_module>
@fschiettecatte
fschiettecatte / mpm_event_module_medium.conf
Last active October 8, 2024 13:31
MPM Event Module Configuration for Medium Servers
#
# MPM Event Module Configuration for Medium Servers
#
# Medium - 4 CPU / 16GB RAM
#
# https://httpd.apache.org/docs/2.4/mod/worker.html
# https://httpd.apache.org/docs/2.4/mod/event.html
#
# Matching WSGI Module Configuration
# WSGIDaemonProcess @@@@@ processes=8 threads=3 display-name=%{GROUP}
@fschiettecatte
fschiettecatte / mpm_event_module_large.conf
Last active October 8, 2024 13:32
MPM Event Module Configuration for Large Servers
#
# MPM Event Module
#
# Large - 16 CPU / 32GB RAM
#
# https://httpd.apache.org/docs/2.4/mod/worker.html
# https://httpd.apache.org/docs/2.4/mod/event.html
#
# Matching WSGI Module Configuration
# WSGIDaemonProcess @@@@@ processes=20 threads=3 display-name=%{GROUP}
@fschiettecatte
fschiettecatte / DjangoConnectionsErrors.md
Last active December 10, 2024 23:19
Django Connections Errors

Django Connections Errors

For a long time I have been running into problems with Django connection errors when running a database query after a long idle period. This does not affect website per-se because connections last a very short time but for batch processes where there is a long interval between database access, Django does not detect that database has dropped the connection and raises an error.

Which really should not be happening because my database connection settings includes:

    'CONN_MAX_AGE': 3500,                   # 3500 seconds because wait_timeout = 3600 in my.cnf