1. Close ALL db handlers before opening a new one (rs = db.execute
(....); do_things; rs.close();)

2. First one will solve 90% of your locking problems. To get rid of
all, you need to make a worker and move ALL db interactions there.
Whenever you need something from DB you will send a message to that
worker.



On Jul 31, 9:59 pm, jungleforce <[email protected]> wrote:
> I hope this is the right place to ask developer questions.
>
> I've built up a fairly substantial application using gears, but I'm
> running into database locking issues and am wondering if anyone has
> come up with strategies to resolve these locks.
>
> I have both a main thread and a worker thread that needs to access the
> database, and it seems either the threads are trying to access the
> database at the same time or I haven't released the access to the
> database correctly.
>
> I guess one solution would be to write a function to handle all db
> requests so that it uses a Try/Catch loop until successful.
>
> What do you think?

Reply via email to