> Connections = (pool_size) * (number of web2py processes) > > So if you have 10 threads and pool_size = 4 > 1 * 4 = 4 connections > > If you have 10 processes (each with 6 threads): > 10 * 4 = 40 connections > > As you can see the number of processes is not a term of the computation. > You must count the number of concurrent processes, the number of > threads does not count, same for the number of requests in the nginx > queue. AHEM... its too late here... "...the number of processes is not a term ..." should read "...the number of threads is not a term ..."
> > If the db seems to be locked you can do on the db server host: > > ps ax | grep TRANSACTION > > you should get many postgres processes IDLE IN TRANSACTION. It is a > symptom of web2py taking long to commit the transaction. > If you do not use the db in some complex view you can try to put a > db.rollback() at the beginning of the controller. > Are you using any web2py scripts (cron or the like)? check that you do > not keep the transaction open if the process is long. Use alway > db.commit! > > mic