sorry. My bad. try: + self._adapter.reconnect()
On Sunday, 16 February 2020 19:17:25 UTC-8, Marcello wrote: > > I got this error: > > File "/home/parra/py4web/py4web/core.py", line 239, in on_request > db._adapter.reconnect() > NameError: name 'db' is not defined > > > > > On Sunday, February 16, 2020 at 10:22:48 PM UTC-3, Massimo Di Pierro wrote: >> >> The db fixture should automatiically try reconnect. >> >> To help me debug can you edit py4web/core.py and add the line below: >> >> class DAL(pydal.DAL, Fixture): >> def on_request(self): >> threadsafevariable.ThreadSafeVariable.restore(ICECUBE) >> + db._adapter.reconnect() >> >> Does it solve the problem? >> >> >> On Saturday, 15 February 2020 04:15:38 UTC-8, Marcello wrote: >>> >>> I'm with lastest version... >>> >>> Shouldn't reconnect to db every page load ??? >>> If the server stays 1 hour without serving pages, a reconnection is >>> needed... or not ? >>> >>> >>> >>> >>> On Saturday, February 15, 2020 at 8:30:58 AM UTC-3, Massimo Di Pierro >>> wrote: >>>> >>>> My guess is that there is some timeout in the mysql config example. >>>> Can you repro with latest py4web? >>>> >>>> On Friday, 14 February 2020 14:31:58 UTC-8, Marcello wrote: >>>>> >>>>> Hi, >>>>> >>>>> Any informatiion about this ? >>>>> Nobody using py4web with mysql ?? >>>>> >>>>> >>>>> >>>>> On Tuesday, February 11, 2020 at 6:58:11 PM UTC-3, Marcello wrote: >>>>>> >>>>>> Hello, >>>>>> >>>>>> I'm trying py4web and found something stragne. >>>>>> Don't know if I'm making something wrong. >>>>>> >>>>>> I'm having "MySQL server has gone away" error if I wait some time >>>>>> (about 10 minutes) betweeen page reloads... >>>>>> >>>>>> I tested same thing with web2py and this problem did not happen... >>>>>> >>>>>> Is it a bug or a problem here ? >>>>>> >>>>>> >>>>>> Thanks >>>>>> Marcello >>>>>> >>>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/765e49a2-b819-4d1c-8356-a7827d4b8f96%40googlegroups.com.