Mitch, You need to set the max_connections variable to something in you my.cnf file. This number is really determined by your OS/Memory etc. but I think the MySQL manual says somewhere about 500 to 700 being possible with Solaris. Currently we use a figure of 220, but I got to that number by monitoring what was going on to see what our usual peak figure was. If you exceed max_connections, clients will not get a db connection so that will be fairly obvious. I'd say choose a number that sounds reasonable for the number of possible simultaneous db connections. How many people will be hitting the site at the same time? Take that number, and multiply by the number of db connections they could use within a short timeframe (say a minute).
Another good thing you could do is to use a pool manager that will open a fixed number of connections at startup, and the connections will be re-used as they are let go by other queries. This can be very good for performance. Hope that's helpful, John John Kemp, Director, Software Development Streetmail Inc. Mitch Fournier wrote: > Hi, > > i've been googlizing for a while now and can't find a straight answer to > this question: > - what is the optimal setting for "max_connections" in mysql? > - how do i start the server w a higher number? > > stats on my db setup: > - database machine has 384MB of ram > - clients are web browsers hitting jsp pages which access the mysql db > - one person can generate tens of threads moving around the site > - current max connections is 100 > - production server is red hat linux, dev server where i do > all my development is win2k > - Connections/Threads_Connected is currently 1:1 (cache problem?) > > i obviously need to do some optimization in my java code and jsp pages (who > doesn't ;), but i also suspect the default 100 connections is too low. can i > set this to 500 or 1000? > > also, i've been looking for a good site with mysql optimization tips, any > suggestions? thanks a ton. > > -mitch > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > . > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php