Looks like the MySQL server isnt running, or you have a sporadic network.
On Oct 9, 2008, at 11:32 AM, Heston James - Cold Beans wrote: > Hello Guys, > > I’m receiving errors in my application on a fairly regular basis now > and I’m not sure how to begin solving it. > > Please find attached a backtrace for the error. It seems that its > struggling to connect to the MySQL server, however I get this after > the application has been running and querying the database for some > time. > > Any ideas what might be causing this? I’d appreciate your thoughts. > The code which throws the error is a very simple > query(some_object).get(id) > > Cheers all, > > Heston > > > > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", > line 414, in get > return self._get(key, ident) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", > line 1211, in _get > return q.all()[0] > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", > line 985, in all > return list(self) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", > line 1073, in __iter__ > return self._execute_and_instances(context) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/query.py", > line 1076, in _execute_and_instances > result = self.session.execute(querycontext.statement, > params=self._params, mapper=self._mapper_zero_or_none(), > _state=self._refresh_state) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/session.py", > line 750, in execute > return self.__connection(engine, close_with_result=True).execute( > File "/var/lib/python-support/python2.5/sqlalchemy/orm/session.py", > line 717, in __connection > return self.transaction._connection_for_bind(engine) > File "/var/lib/python-support/python2.5/sqlalchemy/orm/session.py", > line 326, in _connection_for_bind > conn = bind.contextual_connect() > File "/var/lib/python-support/python2.5/sqlalchemy/engine/base.py", > line 1247, in contextual_connect > return self.Connection(self, self.pool.connect(), > close_with_result=close_with_result, **kwargs) > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 161, in connect > return _ConnectionFairy(self).checkout() > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 321, in __init__ > rec = self._connection_record = pool.get() > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 180, in get > return self.do_get() > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 618, in do_get > con = self.create_connection() > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 141, in create_connection > return _ConnectionRecord(self) > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 217, in __init__ > self.connection = self.__connect() > File "/var/lib/python-support/python2.5/sqlalchemy/pool.py", line > 280, in __connect > connection = self.__pool._creator() > File "/var/lib/python-support/python2.5/sqlalchemy/engine/ > strategies.py", line 80, in connect > raise exc.DBAPIError.instance(None, None, e) > OperationalError: (OperationalError) (2002, "Can't connect to local > MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)") None > None --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---