I really don't know what the problem is.
Magazines are read
FATAL: Sorry, too many customers already
Again and again. At first I thought that sometimes connections are delayed or not closed properly, so I tested this by connecting to the database and checking how many open connections were at any given time, and the answer was always 1.
I tried to connect to the website using DB, and I was able to look at 2 or 3 open connections that were quickly closed when the page was loaded.
My remaining hunch is that sometimes there are parallel connections to the website, and this leads to the fact that the database stops accepting new connections and somehow does not allow you to drop the current connections.
I DO NOT RULE ANY CODE THAT CONNECTS TO THE DATABASE, I use the rather vanilla Django interface (1.7), which handles all connections.
I could not find anything during google search, did anyone have any problems?
EDIT:
Database configuration here (PasteBin)
The essential part:
port = 26445 # (change requires restart) max_connections = 500 # (change requires restart) unix_socket_directory = '/home/clearintent/webapps/norr2_db/run' # (change requires restart) shared_buffers = 32MB # min 128kB # (change requires restart) log_destination = 'stderr' # Valid values are combinations of logging_collector = on # Enable capturing of stderr and csvlog log_directory = 'pg_log' # directory where log files are written, log_filename = 'postgresql-%a.log' # log file name pattern, log_truncate_on_rotation = on # If on, an existing log file with the log_rotation_age = 1d # Automatic rotation of logfiles will log_rotation_size = 0 # Automatic rotation of logfiles will datestyle = 'iso, mdy' lc_messages = 'C' # locale for system error message lc_monetary = 'C' # locale for monetary formatting lc_numeric = 'C' # locale for number formatting lc_time = 'C' # locale for time formatting default_text_search_config = 'pg_catalog.english'
source share