ProgrammingError comes from the DBAPI, so thats the connect
exception. SQLA re-throws it which is why the stack trace isn't
entirely accurate.
On Nov 17, 2008, at 5:24 PM, Dusty Phillips wrote:
>
> 1 = "noah";'})
> self.assert_(content.startswith("<QueryResults>"))
> threads = []
> for i in range(20):
> thread = BridgeRequest()
> thread.start()
> threads.append(thread)
>
> for thread in threads:
> thread.join()
>
> I get a bunch of errors like this on the server:
>
> Traceback (most recent call last):
> File "/Library/Python/2.5/site-packages/web.py-0.23-py2.5.egg/web/
> webapi.py", line 312, in wsgifunc
> result = func()
> File "/Library/Python/2.5/site-packages/web.py-0.23-py2.5.egg/web/
> request.py", line 131, in <lambda>
> func = lambda: handle(inp, fvars)
> File "/Library/Python/2.5/site-packages/web.py-0.23-py2.5.egg/web/
> request.py", line 61, in handle
> return tocall(*([x and urllib.unquote(x) for x in args] + fna))
> File "/Users/dusty/Code/lightspeed-server-gitsvn/server/auth.py",
> line 122, in wrapper
> username = authenticateUser()
> File "/Users/dusty/Code/lightspeed-server-gitsvn/server/auth.py",
> line 58, in authenticateUser
> result = database.engine.execute("SELECT * FROM user WHERE
> username=?", username)
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/engine/base.py", line 1210, in execute
> connection = self.contextual_connect(close_with_result=True)
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/engine/base.py", line 1238, in contextual_connect
> return self.Connection(self, self.pool.connect(),
> close_with_result=close_with_result, **kwargs)
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 161, in connect
> return _ConnectionFairy(self).checkout()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 323, in __init__
> rec = self._connection_record = pool.get()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 180, in get
> return self.do_get()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 674, in do_get
> return self.create_connection()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 141, in create_connection
> return _ConnectionRecord(self)
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 217, in __init__
> self.connection = self.__connect()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/pool.py", line 280, in __connect
> connection = self.__pool._creator()
> File "/Library/Python/2.5/site-packages/SQLAlchemy-0.5.0rc2-
> py2.5.egg/sqlalchemy/engine/strategies.py", line 80, in connect
> raise exc.DBAPIError.instance(None, None, e)
> ProgrammingError: (ProgrammingError) The database specified has not
> been started or can not be found. Your action has been aborted. None
> None
>
>
> I don't think ALL the concurrent requests are throwing this error, but
> most of them are. I can't imagine why the NullPool couldn't connect to
> the database in multithreaded requests but it has no problem doing so
> if the requests are sent consecutively.
>
> I get the same error if I use SingletonThreadPool or StaticPool.
>
> I thought the problem might be in the connection method for the custom
> pyOpenBase utility, but from the looks of the exception its not even
> getting that far.
>
> Am I overlooking something painfully obvious? Does anyone have any
> ideas as to how I can get around one or more of these errors?
>
> Thanks for any insight,
> Dusty
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---