I have a django website using Apache and mod_wsgi. Since the last 4-5 days I keep getting this type of error on my admin e-mail.
OperationalError: (1040, 'Too many connections')
I have installed django-debug-toolbar and I have an average of 100-150 queries for each page and less than 300ms response time. I do not think that I overload my MySql server. On the other hand, this happened some time after I tried to re-configure my httpd.conf
settings.
My site receives 800-1000 hits per day.
These are my httpd.conf
settings
KeepAlive Off
Listen 13646
MaxSpareThreads 15
MinSpareThreads 8
MaxClients 20
ServerLimit 20
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
MaxRequestsPerChild 1000000
StartServers 20
WSGIDaemonProcess <project> processes=7 threads=12 python-path=<path>
WSGIProcessGroup <project>
WSGIRestrictEmbedded off
WSGILazyInitialization On
Any help would be greately appreciated.
PS. I am on a shared hosting plan. I have 512MB RAM for my hosting plan 300MB of them are free.