I recall getting this error a long time ago when using the C library. I
don't remember the specifics but I seem to recall this happened for one of
two reasons if not both....If you mistakenly have two threads using the same
database handler (eg. after a fork()...and yes, it's the wrong way to do it)
then you can get this error. I believe opening my database connections after
forking fixed it.

I also seem to recall that if you don't clean up your C queries correctly
you can get this problem. For instance not calling mysql_store_result()
after a query (even if your query shouldn't return data) or if you dont call
mysql_free_result() and then proceed to do more queries with the same
database handler (ie. not closing the connection each time).

I've never used PHP, I only use the C library to do my database chores so
I'm not sure how transferable my info is to situations where PHP is used.

Hopefully this might get you looking in the right direction though....



Jason DeStefano
Lead Software Developer
LogLogic, Inc.




----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 1:09 PM
Subject: Commands out of sync


> Hi-
>
> I'm running MySQL 3.23.51 with PHP 4.2.3 on a Slackware 8.1 system with
Dual
> Athlon MP 1.2's and 1 GB RAM.
>
> We run a busy site, approximately 3 million page views/day, almost all of
> which hit the database.  The problem is that we are getting the
> error "Commands out of sync.  You cannot perform this command now.  I have
> read the unhelpful section of the MySQL manual, and done several google
> searches, none of which have helped.  None of our queries are very
complex,
> nor does this error seem to occur with any consistency.  Sometimes it
happens
> when we're busy, sometimes when we're slow, etc.  We never use anything
like
> mysql_query_unbuffered(), only mysql_query(), mysql_select_db(), and
> mysql_pconnect().  Has anyone encountered this error before?  Is there any
> known situation where this should occur?  Any help is greatly appreciated.
>
> Matt
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to