Re: Issue while simultaneously accessing mysql db using clsql on a hunchentoot server
Nathan Bird <[email protected]> Wed, 03 Aug 2011 10:53:19 -0400
| Newsgroups | gmane.lisp.clsql.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed 03 Aug 2011 09:46:30 AM EDT, Kushal Das wrote: > On Wed, Aug 3, 2011 at 7:11 PM,<[email protected]> wrote: >> >> I hope you are aware of the fact that hunchentoot is a multi-threaded >> application and you need to have a dedicated database connection for >> each thread. Otherwise you'll get into big trouble .... > Trying to do that only, but failing. Even tried to use clsql-fuild. > > Can you point me to some example? > > Kushal Russ just wrote up a blog post that might illuminate the situation more: http://russ.unwashedmeme.com/blog/?p=218 Generally a quick check is: make sure you aren't pulling an object from the database and using it in multiple requests. The view-class objects keep a reference to the database they originally came from and use that database connection in the future even if you try to point it at a different database.