will look into this.

On Feb 23, 12:46 am, Kevin Bowling <kevin.bowl...@gmail.com> wrote:
> Yes,
>
> I have an app and did a 5 connection pool.  It seems MySQL by default
> closes connections every 8 hours.  Therefore, if nobody accesses the
> app overnight, it dies.
>
> I know other things that use connection pools like Openfire XMPP
> server poll it quite regularly to keep it open.  I don't know if that
> is necessary.  Perhaps catch the exception, try a reconnect, and raise
> if that fails?
>
> For now I'm working around it by disabling the connection pool.
>
> Regards,
> Kevin
>
> On Feb 22, 11:16 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > Sorry my collection is very slow...
>
> > It cannot b predicted when a connection fail so if it fails in between
> > a trasaction, i.e. when serving a request, it will generate a ticket
> > but it should do so only once since this connection will be discared
> > (not recycled) and a new one will be placed in the pool.
>
> > Please tell me more about this problem. Do you get it occasionally or
> > repeatedly? What is the pattern?
>
> > On Feb 21, 8:17 pm, Kevin Bowling <kevin.bowl...@gmail.com> wrote:
>
> > > I get the following error.  I have a 5 connection pool in my DAL
> > > connection line.  Shouldn't the DAL keep the connection alive or at
> > > least mark it dead and reestablish or use another connection rather
> > > than throwing an error 500?
>
> > > Traceback (most recent call last):
> > >   File "gluon/restricted.py", line 173, in restricted
> > >     exec ccode in environment
> > >   File "/var/www/x/web2py/applications/conman/models/db.py", line 4,
> > > in <module>
> > >     db=DAL("mysql://a:b...@localhost/c", pool_size=5)
> > >   File "gluon/sql.py", line 3764, in DAL
> > >     return SQLDB(uri, pool_size=pool_size, folder=folder,
> > > db_codec=db_codec, check_reserved=check_reserved)
> > >   File "gluon/sql.py", line 929, in __init__
> > >     self._execute('SET FOREIGN_KEY_CHECKS=1;')
> > >   File "gluon/sql.py", line 928, in <lambda>
> > >     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> > >   File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line
> > > 173, in execute
> > >     self.errorhandler(self, exc, value)
> > >   File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line
> > > 36, in defaulterrorhandler
> > >     raise errorclass, errorvalue
> > > OperationalError: (2006, 'MySQL server has gone away')

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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.

Reply via email to