Not that if you ask for pool_size=100 connections it does not create 100 connections. It creates them as necessary up to 100. In other words the actual number of connection if the max number of concurrent connections required to serve the requested pages, capped at 100. If it happens that your server never have more than 37 concurrent web requests, than the number of persistent connections will be 37. Also note that your web server has a max number of threads so it does not make sense have pool_size higher than the number of max_threads. Both parameters can be changed via configuration.
On Jun 26, 11:30 am, Speedbird <ju...@techfuel.net> wrote: > Excellent, then from what I gather, as with all other configuration > rules-of-thumb, the answer is "It depends." While the optimal size > depends on anticipated load and average database transaction time, the > optimum connection pool size will usually be smaller than one might > expect. If you take for instance, an app with a connection pool of > 10, it can serve a relatively moderate load (400 concurrent users) I > am basing this on my experience using MySQL which is what I am > developing my web2py apps under. > > hth > -- Julio > > On Jun 26, 8:54 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > The only limits are those imposed by the database. They can always be > > changed by editing mysql.conf, postegrsql.conf etc. > > sqlite does not use pooling. > > > Massimo > > > On Jun 26, 9:57 am, Speedbird <ju...@techfuel.net> wrote: > > > > Massimo, is there a limit or a relationship between the database and > > > the number of collection pools to be defined? > > > > (I am sorry, I am at work currently and do not have access to the > > > source to see how pool_size is implemented) > > > > Thanks! > > > > On Jun 25, 4:57 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > db=SQLDB(....,pool_size=10) > > > > > will do connection pooling and connections will be reused > > > > > db.define_table(....,migrate=False) > > > > > it will not attempt to create the table if you know it there and you > > > > have not changed it. > > > > > It will be much faster. > > > > > Massimo > > > > > On Jun 25, 6:46 pm, kuba <kubano...@gmail.com> wrote: > > > > > > Hi guys, > > > > > > I am total newbie to web2py, and one thing really irritates me. > > > > > As i noticed every time I refresh application in web browser db.py and > > > > > any other file in models dir are executed. In tutorial it states that > > > > > whole db initialization should be specified there and as I understand > > > > > during this proces dafine_table functions connects with database to > > > > > check if the table matches its definition.... > > > > > > This means every time i refresh any page or go to another a connection > > > > > with database is made. > > > > > > is it really is this way or am i missing something ? > > > > > > I hope i am wrong :) > > > > > > Thx for help --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---