now thats ok, but let me reflect about: take into consideration that, i dont have experience in web application, neither database server, all are new for me, so i could be wrong, i hope not.
Application "B" (DAL standalone), should read, update and insert data in the database, then: db = DAL ('mysql :/ / ...', migrate = False) db.define_table ('mytable', Field ('myfield')) rows = db (db.mytable.myfield! = None). select () Now if the application "A"(web2py), update or insert in the mytable.myfield, so, how application "B" will take notice? here is my error, i created a new connection and ... db = DAL ('mysql :/ / ...', migrate = False) db.define_table ('mytable', Field ('myfield')) rows = db (db.mytable.myfield! = None). select () so ran up to exceed the limit of "max_connections", set in MySQL System Variables and as a result we have the error messages. Yes, I considered that the MySQL server responds when triggered by a client and the connection expires after the answer, but the application "B", instantiated and maintained until the limit of connections, and when I stopped "B", application "A" (web2py ), returned, so i'm doing the following : db = DAL ('mysql :/ / ...', migrate = False) db.define_table ('mytable', Field ('myfield')) db.close () now, every time I need the rows ... db._adapter.reconnect () rows = db (db.mytable.myfield! = None). select () (... Read, update and insert and ...) db.close () now works fine. Application "B" manages a network of 50 devices in a master slave architecture, The devices are composed of sensors and man machine interface. Application "A", allows you to monitor and adjust the devices. , 2013/8/28 OrrĂ¹ <vsso...@gmail.com> > > Hi, > I have two applications running: the application "A" is an instance of > web2py and application B is based on the "DAL" standalone, aplications "A" > and "B", both with to "migrate=False" , to connecting to the same DB > (mysql server). > *Sometimes the two fail* and return the following error: > > Application "A" (web2py): > <type 'exceptions.RuntimeError'> Failure to connect, tried 5 times: > Traceback (most recent call last): File > "/home/nabladel/web2py/web2py/gluon/dal.py", line 7276, in __init__ > self._adapter = ADAPTERS[self._dbname](**kwargs) File > "/home/nabladel/web2py/web2py/gluon/dal.py", line 2483, in __init__ if > do_connect: self.reconnect() File > "/home/nabladel/web2py/web2py/gluon/dal.py", line 596, in reconnect > self.connection = f() File "/home/nabladel/web2py/web2py/gluon/dal.py", > line 2481, in connector return self.driver.connect(**driver_args) File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/__init__.py", line 93, > in Connect return Connection(*args, **kwargs) File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/connections.py", line > 575, in __init__ self._connect() File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/connections.py", line > 740, in _connect self._get_server_information() File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/connections.py", line > 907, in _get_server_information self.server_charset = > charset_by_id(self.server_language).name File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/charset.py", line 173, > in charset_by_id return _charsets.by_id(id) File > "/home/nabladel/web2py/web2py/gluon/contrib/pymysql/charset.py", line 21, > in by_id return self._by_id[id] KeyError: 110 > > Application "B" (DAL standalone): > DEBUG: connect attempt 0, connection error: > Traceback (most recent call last): > File "/home/nabladel/aplication/gluon/dal.py", line 7351, in __init__ > self._adapter = ADAPTERS[self._dbname](**kwargs) > File "/home/nabladel/aplication/gluon/dal.py", line 2499, in __init__ > if do_connect: self.reconnect() > File "/home/nabladel/aplication/gluon/dal.py", line 592, in reconnect > self.connection = f() > File > "/home/nabladel/aplication/MinimalModbus-0.4/icontrol4/gluon/dal.py", line > 2497, in connector > return self.driver.connect(**driver_args) > File "/home/nabladel/aplication/gluon/contrib/pymysql/__init__.py", line > 93, in Connect > return Connection(*args, **kwargs) > File "/home/nabladel/aplication/gluon/contrib/pymysql/connections.py", > line 575, in __init__ > self._connect() > File "/home/nabladel/aplication/gluon/contrib/pymysql/connections.py", > line 740, in _connect > self._get_server_information() > File "/home/nabladel/aplication/gluon/contrib/pymysql/connections.py", > line 907, in _get_server_information > self.server_charset = charset_by_id(self.server_language).name > File "/home/nabladel/aplication/gluon/contrib/pymysql/charset.py", line > 173, in charset_by_id > return _charsets.by_id(id) > File "/home/nabladel/aplication/gluon/contrib/pymysql/charset.py", line > 21, in by_id > return self._by_id[id] > KeyError: 110 > > application "B" I start through the python IDLE, "web2py" out error only > when I close IDLE. > web2py: Version 2.4.2 stable > can someone help me? > > > -- > > --- > 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. > For more options, visit https://groups.google.com/groups/opt_out. > -- --- 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. For more options, visit https://groups.google.com/groups/opt_out.