hi ,
      Leandro Lucarella's solution to give timeout while creating the
connection solved by lock issues
      Thanks,
                  DBname?timeout=50000

On Feb 5, 2008 3:30 PM, <[EMAIL PROTECTED]>
wrote:

> Send sqlobject-discuss mailing list submissions to
>        sqlobject-discuss@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
> or, via email, send a message with subject or body 'help' to
>        [EMAIL PROTECTED]
>
> You can reach the person managing the list at
>        [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sqlobject-discuss digest..."
>
>
> Today's Topics:
>
>   1. Database is locked (vishnu)
>   2. Re: Database is locked (Jorge Godoy)
>   3. Re: Database is locked (Oleg Broytmann)
>   4. Re: Database is locked (Nick Murdoch)
>   5. Re: Database is locked (Leandro Lucarella)
>   6. Re: Database is locked (Oleg Broytmann)
>   7. Re: orderBy = SQL function? (Barry Ferg)
>   8. dict-based SELECT (Christopher Singley)
>   9. Re: dict-based SELECT (Oleg Broytmann)
>  10. Re: dict-based SELECT (Frank Wagner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 4 Feb 2008 14:47:48 +0530
> From: vishnu <[EMAIL PROTECTED]>
> Subject: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID:
>        <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>    Im currently using 0.9.2 version SQLObject in my CentOS5.1 system.
>
> Im using SQLObject in a multi-threaded application. I have my own mutex
> lock
> to prevent more than one write operation. No restrictions in application
> for
> Read operation.
>
> My problem is that i get occational "Database is locked error".
>
> Im not sure as to the cause of this issue. is there a way to give a
> timeout
> to wait for lock release.
> can anyone help,
>
> I dont find any help in SQLObject site about any syntax on timeout
>
> please help
> --
> Vishnu,
> Developer,
> B I N A R Y K A R M A,
> Mobile : +91-9994475599
> Tel : 044-64621656
> email: [EMAIL PROTECTED]
>
>
> "A husband and wife are like clothes for each other,
> Those among you are the best who are good to their wives".
> - Muhammad, the final Prophet (peace be upon him)
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 2
> Date: Mon, 04 Feb 2008 08:00:10 -0200
> From: Jorge Godoy <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> vishnu wrote:
>
> > Hi,
> >     Im currently using 0.9.2 version SQLObject in my CentOS5.1 system.
> >
> > Im using SQLObject in a multi-threaded application. I have my own mutex
> > lock to prevent more than one write operation. No restrictions in
> > application for Read operation.
>
> Why can't you let the database server take care of locking things as
> needed?
> I have applications used by multiple users in multiple processes (web) and
> the database does all what is needed.  It really feels like if there were
> several desktop applications and all of them worked simultaneously.
>
> > My problem is that i get occational "Database is locked error".
> >
> > Im not sure as to the cause of this issue. is there a way to give a
> > timeout to wait for lock release.
>
> It should probably be a problem in your locking mechanism...
>
> > I dont find any help in SQLObject site about any syntax on timeout
>
> Google give some hints of using other modules to have this implemented.
>  But
> I still believe that it would be better to let the database handle that.
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 4 Feb 2008 18:57:44 +0300
> From: Oleg Broytmann <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Feb 04, 2008 at 02:47:48PM +0530, vishnu wrote:
> > My problem is that i get occational "Database is locked error".
>
>   By this error I can guess you are using SQLite as the backend. I don't
> know a way to fix or overcome the problem with SQLite.
>   I have been developing a few commercial programs that use SQLObject. For
> small customer where there are only 1 or 2 clients applications I use
> SQLite as the backend. But for larger installations where I need to
> install
> more client applications connected to one backend I use a real database
> server. I use PostgreSQL but you can use whatever suites your needs
> - PostgreSQL or MySQL, e.g.
>
> Oleg.
> --
>     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
>           Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 04 Feb 2008 16:37:45 +0000
> From: Nick Murdoch <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=UTF-8
>
> >    By this error I can guess you are using SQLite as the backend. I
> don't
> > know a way to fix or overcome the problem with SQLite.
>
> You can "fix" the broken database by using sqlite's `.output FILENAME`
> followed by `.dump` to output all the data, then read it back into a
> blank sqlite database with `sqlite newdatabase.sqlite < FILENAME`.
>
> These sort of problems are why I started just using a test psql database
> for developing with, rather than sqlite :)
>
>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 4 Feb 2008 16:07:38 -0200
> From: Leandro Lucarella <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=utf-8
>
> Oleg Broytmann, el  4 de febrero a las 18:57 me escribiste:
> > On Mon, Feb 04, 2008 at 02:47:48PM +0530, vishnu wrote:
> > > My problem is that i get occational "Database is locked error".
> >
> >    By this error I can guess you are using SQLite as the backend. I
> don't
> > know a way to fix or overcome the problem with SQLite.
>
> There is a parameter to SQLite to wait for the lock for a while. Just pass
> timeout=something when creating the SQLite connection, for example:
> sqlite:///....?timeout=5000
> If you want it to wait 5 seconds before raising the database locked
> exception.
>
> It seems that this parameter is still undocumented :)
>
> --
> Leandro Lucarella (luca) | Blog colectivo:
> http://www.mazziblog.com.ar/blog/
>
> ----------------------------------------------------------------------------
> GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
>
> ----------------------------------------------------------------------------
> CHINO ATRAPA COTORRAS
>        -- Cr?nica TV
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 4 Feb 2008 23:41:40 +0300
> From: Oleg Broytmann <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] Database is locked
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Feb 04, 2008 at 04:07:38PM -0200, Leandro Lucarella wrote:
> > Oleg Broytmann, el  4 de febrero a las 18:57 me escribiste:
> > > On Mon, Feb 04, 2008 at 02:47:48PM +0530, vishnu wrote:
> > > > My problem is that i get occational "Database is locked error".
> > >
> > >    By this error I can guess you are using SQLite as the backend. I
> don't
> > > know a way to fix or overcome the problem with SQLite.
> >
> > There is a parameter to SQLite to wait for the lock for a while. Just
> pass
> > timeout=something when creating the SQLite connection, for example:
> > sqlite:///....?timeout=5000
> > If you want it to wait 5 seconds before raising the database locked
> > exception.
>
>   It never helped me. Probably I had been doing something wrong.
>
> Oleg.
> --
>     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
>           Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 4 Feb 2008 19:00:43 -0800
> From: "Barry Ferg" <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] orderBy = SQL function?
> To: "Oleg Broytmann" <[EMAIL PROTECTED]>,
>        sqlobject-discuss@lists.sourceforge.net
> Message-ID:
>        <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Feb 3, 2008 11:33 PM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> > On Sun, Feb 03, 2008 at 09:04:20PM -0800, Barry Ferg wrote:
> > > Is there some way of reliably using the orderBy parameter with
> > > something other than a simple column, like a SQL function?
> >
> >    Use SQLMultipleJoin instead of MultipleJoin. The difference is that
> > MultipleJoin returns a list (that is sorted by SQLObject in Python,
> hence
> > orderBy can be only a name of a column) where SQLMultipleJoin returns
> > whatever .select() returns (an instance of SelectResult class) which
> passes
> > orderBy to SQL.
> >
> > Oleg.
>
> Thanks Oleg, that works!  I don't think the documentation had anything
> to say about the way that relates to orderBy - I suppose I should
> spend more quality time with the source.
>
>
>
> ------------------------------
>
> Message: 8
> Date: Mon, 4 Feb 2008 23:33:21 -0500
> From: Christopher Singley <[EMAIL PROTECTED]>
> Subject: [SQLObject] dict-based SELECT
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;  charset="us-ascii"
>
> I've made great use of passing dicts into select methods, e.g.:
> queryDict= {'name': 'jim', 'age':34}
> result = Person.selectBy(**queryDict)
>
> How can I combine a dict-based SELECT with an inequality?
> Like if I wanted to further refine the above query to filter
> for (e.g.) only those with timeStamp <= datetime.date(2007,1,1)
>
> With my pathetically weak background in SQL, I'm afraid I'm not
> getting anywhere fast with the sqlbuilder documentation.  Any help
> would be much appreciated.
>
> TIA,
> cs
>
>
>
> ------------------------------
>
> Message: 9
> Date: Tue, 5 Feb 2008 11:35:19 +0300
> From: Oleg Broytmann <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] dict-based SELECT
> To: sqlobject-discuss@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> On Mon, Feb 04, 2008 at 11:33:21PM -0500, Christopher Singley wrote:
> > I've made great use of passing dicts into select methods, e.g.:
> > queryDict= {'name': 'jim', 'age':34}
> > result = Person.selectBy(**queryDict)
> >
> > How can I combine a dict-based SELECT with an inequality?
> > Like if I wanted to further refine the above query to filter
> > for (e.g.) only those with timeStamp <= datetime.date(2007,1,1)
>
>   Hint: how can you express the ineqality with a dict?
>
> Oleg.
> --
>     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
>           Programmers don't die, they just GOSUB without RETURN.
>
>
>
> ------------------------------
>
> Message: 10
> Date: Tue, 5 Feb 2008 11:00:10 +0100
> From: "Frank Wagner" <[EMAIL PROTECTED]>
> Subject: Re: [SQLObject] dict-based SELECT
> To: "Oleg Broytmann" <[EMAIL PROTECTED]>,
>        sqlobject-discuss@lists.sourceforge.net
> Message-ID:
>        <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=UTF-8
>
> I think that it won?t be possible the way you want, but why dont you
> just pass your criteria like this:
>
> # didn?t test this one
> querySet = (Person.q.name == "jim", Person.q.age == 34,
> Person.q.timeStamp <= datetime.date(2007,1,1))
>
> # but this definately works
> querySet = AND(Person.q.name == "jim", Person.q.age == 34,
> Person.q.timeStamp <= datetime.date(2007,1,1))
> # or, equivalent:
> querySet = ((Person.q.name == "jim") & (Person.q.age == 34) &
> (Person.q.timeStamp <= datetime.date(2007,1,1)))
>
> persons = Person.select(querySet)
>
> this should work.
>
>
> On Feb 5, 2008 9:35 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> > On Mon, Feb 04, 2008 at 11:33:21PM -0500, Christopher Singley wrote:
> > > I've made great use of passing dicts into select methods, e.g.:
> > > queryDict= {'name': 'jim', 'age':34}
> > > result = Person.selectBy(**queryDict)
> > >
> > > How can I combine a dict-based SELECT with an inequality?
> > > Like if I wanted to further refine the above query to filter
> > > for (e.g.) only those with timeStamp <= datetime.date(2007,1,1)
> >
> >    Hint: how can you express the ineqality with a dict?
> >
> > Oleg.
> > --
> >      Oleg Broytmann            http://phd.pp.ru/
> [EMAIL PROTECTED]
> >            Programmers don't die, they just GOSUB without RETURN.
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > sqlobject-discuss mailing list
> > sqlobject-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
> >
>
> ------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
> ------------------------------
>
> _______________________________________________
> sqlobject-discuss mailing list
> sqlobject-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>
>
> End of sqlobject-discuss Digest, Vol 21, Issue 2
> ************************************************
>



-- 
Vishnu,
Developer,
B I N A R Y K A R M A,
Mobile : +91-9994475599
Tel : 044-64621656
email: [EMAIL PROTECTED]


"A husband and wife are like clothes for each other,
Those among you are the best who are good to their wives".
- Muhammad, the final Prophet (peace be upon him)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to