php - bottleneck issue mysql -


I have this project auction portal, sometimes the user can make a bid or a better word request bid Occasionally takes 2-3 seconds before registering, the dispute is that the auction has already closed before the system bids someone.

I have added a log to see this, and here I have found:

  Enter the date | Auction close date 2012-06-25 14:40:57 2012-06-25 14:40:54   

As you can see, the auction was already close but The bid was processed for a second just to clarify, if the auction has already closed, then the user can not make a bid, so I'm sure the request was made before closing.

It is auctioned every day and I do not know triggering this problem I am using PHP and MySQL.

One possible reason is that the user loads the page with a 'bid' button, the auction is off Has been done, the button is still and the action is executed accordingly. If you validate that the auction is closed right before inserting it should never be a selection and the time between INSERT should be & gt; 0.1 seconds I assume that you do not validate the auction status before adding the final bid.

Comments