I'm running a Django website off Apache and MySQL. I'm using a t1.micro instance. After every couple of days, my server starts giving a 500 error. I solve this problem by restarting the Apache2 and MySQL server. Any idea on what might be causing this and how to solve it will be appreciated.
[Tue Aug 12 20:29:18.770130 2014] [:error] [pid 6233] [client 31.13.102.116:62200] mod_wsgi (pid=6233): Exception occurred processing WSGI script '/var/www/html/sp-django-master/mysite/wsgi.py'., referer: http://www.meddy.co/doclistings/?selection=Internal+Medicine&genderselect=Select+a+Gender&languageselect=Choose+a+Language&submit
[Tue Aug 12 20:29:18.770256 2014] [:error] [pid 6233] [client 31.13.102.116:62200] IOError: failed to write data, referer: http://www.meddy.co/doclistings/?selection=Internal+Medicine&genderselect=Select+a+Gender&languageselect=Choose+a+Language&submit
[Wed Aug 13 14:53:10.843252 2014] [mpm_prefork:notice] [pid 1105] AH00169: caught SIGTERM, shutting down
[Wed Aug 13 14:53:11.808998 2014] [mpm_prefork:notice] [pid 8047] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.3 mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Wed Aug 13 14:53:11.809131 2014] [core:notice] [pid 8047] AH00094: Command line: '/usr/sbin/apache2'