On Tue, Oct 02, 2001 at 11:45:51PM -0400, Ron Bickers wrote:
The log shows that at least through #5 happened, apparently without any problems. The last two log entries (and their corresponding empty records in the MySQL database) seem to indicate that 'sendOrder' ran again, which initiated a new session since the previous had been invalidated. I'm not sure what all this means, but it looks bizarre.
I see. You may want to analyze your HTTP logs as well, see if there were multiple requests, etc.
As for unique, sequential numbering; try a transactional database. Current versions of MySQL can do transactions as well, but for reliability I'd personally opt for PostgreSQL; orders should be stored as securely as possible, automically, etc. And PostgreSQL may even be faster than MySQL for you in your application; MySQL no longer can claim being the fastest.
Interesting you should say that. Has PostgreSQL done something in the last 6 months or so to increase its speed? Every time I give it a try, my simple queries used for browsing and searching products prove many times slower than MySQL. It might mean 4 seconds instead of 1, but 4 seconds in Web time is a lot. 100% of my queries (except this order storage) are read only.
Maybe an index here or there would help? I do know that version 7.1 has introduced many speedups and that SourceForge has switched from MySQL to PostgreSQL because the latter was faster for their usage.
Maybe I'll try setting up a transaction capable table just for this portion. However, I can't see why the transaction would have been rolled back since it appears to have made it to the end on the first try.
So it would seem. Strange! -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------