kmh wrote:
> 
> So I tried running this patch on a very low-volume production server
> and MySQL (4.1/ Ubuntu Breezy) started chucking some "Too many
> connections" errors.

:-) But no "lost connections" now?

> I'm no expert on RDBMS.  I did some googling and discovered the MySQL
> "max_connections" setting.  Mine is at the default of 100.  I would
> have thought that would be well-adequate in this particular case,
> though the user-agent in the error message was a Yahoo-bot so it is
> possible that there were many simultaneous requests at the time (my
> access log was off so I can't say exactly - I'll turned it on if I try
> again).  I don't know how to tell if this is a problem with the patch
> not cleaning up after itself or my database setup being piss-poor.  Any
> tips?

You can try to reproduce the problem with openload (now it is Open Web 
Load: http://sourceforge.net/projects/openwebload/). If you cannot 
reproduce it, it maybe something else.

Some bots can overload the server. I never had problems with Yahoo-bot, 
but some bot from Greece brought my web site down exactly once a week by 
issuing a lot of requests per second, which triggered "too many 
connections" error. Since then I switch to flup and restricted number of 
connections and requests. My django.fcgi looks like this:

===========================
#!/usr/bin/env python2.4
if __name__ == '__main__':
     import sys, os

     sys.path += ['path-to-django']
     sys.path += ['path-to-myproject']
     os.environ['DJANGO_SETTINGS_MODULE'] = 'my.settings'

     from flup.server.fcgi import WSGIServer
     from django.core.handlers.wsgi import WSGIHandler
     server = WSGIServer(WSGIHandler())

     server.capability['FCGI_MAX_CONNS'] = 5
     server.capability['FCGI_MAX_REQS']  = 50

     server.run()
===========================

I don't know what numbers should be used. I guess you should experiment 
a little. But anyway Greek bot doesn't bother me anymore. I don't know, 
if bot's authors changed its behavior, or my settings actually helped. ;-)

Keep me posted.

Thanks,

Eugene


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to