[EMAIL PROTECTED] writes:
> Im using aolserver - but its Im writing it in php later too.
> code is below

> set sql "BEGIN WORK"
> ns_db exec $db $sql

> set sql "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE"
> ns_db exec $db $sql

> set sql "UPDATE threads set views = views + 1 WHERE forum_id = $forum_id
> AND thread_id = $thread_id"
> ns_db dml $db $sql

> set sql "COMMIT WORK"
> ns_db exec $db $sql

Are you sure that ns_db exec isn't "helpfully" doing a commit after each
command?

> But 5 or 6 concurrent requests always produce the correct results, any
> more than that things go wrong.

Sounds like you might be running into some sort of number-of-concurrent-
connections limit in AOLserver.  I'm not sure what happens when there
are too many threads for the available number of database connections in
AOLserver, but this example suggests that it's not good.  Anyone know?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to