[Sqlrelay-discussion] Failed to get a cursor id!
Brought to you by:
mused
|
From: jzhang <jz...@po...> - 2007-10-19 01:19:34
|
Hi!
I use mysql replication and sqlrelay for load banlancing. My symfony program got some error:
ONE:[DBException]Failed to get a cursor id. A network error may have ocurred. Success stack trace
TWO:[DBException] stack trace
the hint followed them were the same. Just as follows:
[DBException]
stack trace
at ()
in SF_ROOT_DIR/lib/db.class.php line 370 ...
367 if(!sqlrcur_executeQuery($sqlrcursor->cursor))
368 {
369 $this->errmessage = sqlrcur_errorMessage($sqlrcursor->cursor);
370 throw new DBException( $this->errmessage );
371 }
372 //sqlrcon_endSession($this->con);
373 return $sqlrcursor;
at DB->execute(object('DB_sqlrelay_cursor'))
in SF_ROOT_DIR/apps/frontend/modules/manage/actions/listMySuppliersAction.class.php line 16 ...
//p_numPerPage int
$db->setString($smst, '3', sfConfig::get('app_listMySuppliers') );
$result = $db->execute($smst);
$suppliers=array();
while($row=$db->fetchAssoc($result)) {
at listMySuppliersAction->execute()
in SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 115 ...
// execute the action
$actionInstance->preExecute();
$viewName = $actionInstance->execute();
if ($viewName == '')
{
$viewName = sfView::SUCCESS;
at sfExecutionFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_SYMFONY_LIB_DIR/filter/sfFlashFilter.class.php line 50 ...
}
// execute next filter
$filterChain->execute();
// remove flash that are tagged to be removed
$names = $userAttributeHolder->getNames('symfony/flash/remove');
at sfFlashFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_SYMFONY_LIB_DIR/filter/sfCommonFilter.class.php line 29 ...
public function execute($filterChain)
{
// execute next filter
$filterChain->execute();
// execute this filter only once
$response = $this->getContext()->getResponse();
at sfCommonFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_ROOT_DIR/apps/frontend/lib/filter/navigatorFilter.class.php line 84 ...
//var_dump($this->getContext());
$this->getContext()->getRequest()->setParameter('navigator',$navigator);
$this->getContext()->getRequest()->setParameter('menu',$menu);
$filterChain->execute();
}
}
at navigatorFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_ROOT_DIR/apps/frontend/lib/filter/myBasicSecurityFilter.class.php line 106 ...
if ($credential === null || $user->hasCredential($credential))
{
// the user has access, continue
$filterChain->execute();
}
else
{
at myBasicSecurityFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_SYMFONY_LIB_DIR/filter/sfWebDebugFilter.class.php line 35 ...
}
// execute next filter
$filterChain->execute();
$context = $this->getContext();
$response = $context->getResponse();
at sfWebDebugFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_SYMFONY_LIB_DIR/filter/sfRenderingFilter.class.php line 33 ...
public function execute($filterChain)
{
// execute next filter
$filterChain->execute();
if (sfConfig::get('sf_logging_enabled'))
{
at sfRenderingFilter->execute(object('sfFilterChain'))
in SF_SYMFONY_LIB_DIR/filter/sfFilterChain.class.php line 43 ...
}
// execute the next filter
$this->chain[$this->index]->execute($this);
}
}
at sfFilterChain->execute()
in SF_SYMFONY_LIB_DIR/controller/sfController.class.php line 276 ...
}
// process the filter chain
$filterChain->execute();
}
else
{
at sfController->forward('manage', 'listMySuppliers')
in SF_SYMFONY_LIB_DIR/controller/sfFrontWebController.class.php line 48 ...
$actionName = $request->getParameter('action');
// make the first request
$this->forward($moduleName, $actionName);
}
catch (sfException $e)
{
at sfFrontWebController->dispatch()
in SF_ROOT_DIR/web/frontend/frontend_dev.php line 11 ...
require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
sfContext::getInstance()->getController()->dispatch();
"SF_ROOT_DIR/lib/db.class.php" is a packaging program in order to supply a interface to sqlrelay for other programs . The error one comes out more often than error tow. I think the error one is brought by error two. If i use the router instance tranmit to the connection instance , the errors come often; if i get rid of router instance ,the errors gone.
This afternoon i debugged, results are as follows:
debugging from router instance:
query:
call sp_getMySuppliers(?,?,?,@totalCount,@totalPages,@currentPage)
getting query succeeded
getting input binds...
:1
STRING
75
:2
INTEGER
1
:3
INTEGER
5
done getting input binds
getting output binds...
done getting output binds
getting send column info...
send column info
done getting send column info...
processing query...
preparing/executing...
commit or rollback check...
commit or rollback needed
done with commit or rollback check
processing query succeeded
done processing query
debugging from connect instance:
query:
call sp_getMySuppliers(?,?,?,@totalCount,@totalPages,@currentPage)
getting query succeeded
getting input binds...
:1
STRING
75
:2
INTEGER
1
:3
INTEGER
5
done getting input binds
getting output binds...
done getting output binds
getting send column info...
send column info
done getting send column info...
processing query...
preparing/executing...
commit or rollback check...
commit or rollback needed
done with commit or rollback check
processing query succeeded
done processing query
returning result set header...
returning row counts...
sending row counts...
actual rows: 3
affected rows: -1
done sending row counts
done returning row counts
column info will be sent
returning column counts...
done returning column counts
sending column type format...
id's
done sending column type format
returning column info...
supplierID:2:4 (10,0) NOT NULL Primary key
supplierInfoStateID:4:1 (1,0) NOT NULL
dataInputTypeID:4:1 (2,0) NOT NULL
branchEmployeeID:3:2 (5,0)
memberID:55:8 (15,0)
spiderSourceID:2:4 (10,0)
processDate:6:8 (19,0) NOT NULL
businessScope:1:763 (762,0) NOT NULL
description:44:16777215 (196605,0) NOT NULL
annualSales:1:61 (60,0)
contactID:55:8 (15,0) NOT NULL
dialCount:2:4 (10,0) NOT NULL
url:1:451 (450,0)
supplierType:34:3 (3,0) NOT NULL
supplierScore:15:4 (3,1) NOT NULL
pageStyle:4:1 (3,0) NOT NULL
hasPojaaPage:4:1 (1,0)
pojaaURL:1:451 (450,0)
profileLastUpdate:6:8 (19,0) NOT NULL
viewCounter:55:8 (20,0) NOT NULL
bookmarkCounts:2:4 (10,0) NOT NULL
submitIPAddress:1:121 (120,0)
enterpriseTypeID:4:1 (2,0) NOT NULL
companyName:1:301 (300,0) NOT NULL
companyNameAlias1:1:91 (90,0)
branchCompanyName:1:91 (90,0)
SFranchiseID:2:4 (10,0)
sub4industryCode:34:15 (15,0)
dateEstablished:6:8 (19,0) NOT NULL
registeredCapital:14:8 (22,31)
CurrencyTypeID:4:1 (3,0)
incorporationPlace:1:61 (60,0)
focusMarkets:1:751 (750,0)
CEO_President:1:61 (60,0)
chairman:1:61 (60,0)
annualExportUSD:1:61 (60,0)
numRDStaff:1:61 (60,0)
numStaff:1:61 (60,0)
OEMService:4:1 (1,0) NOT NULL
AuthorizedMemberID:55:8 (15,0) NOT NULL
ForeignSupplierCode:34:42 (42,0)
ChineseInvestor1:1:301 (300,0)
ForeignInvestor1:1:301 (300,0)
FI_NationID:4:1 (3,0) NOT NULL
numForeignStaff:1:61 (60,0)
majorCustomers:1:751 (750,0)
targetCustomers:1:751 (750,0)
sub3CategoryID:3:2 (5,0) NOT NULL
sub4CategoryID:3:2 (5,0) NOT NULL
done returning column info
returning output bind values
0
done returning output bind values
done returning result set header
handle query succeeded
returning result set data...
skipping 0 rows...
done skipping rows
fetching 10 rows...
"384","3","1","0","75","0","2007-10-17 21:21:19","shop1111","shop1111","0","578","0","","E","0.0","0","0",NULL"2007-10-18 16:14:11","0","0","192.168.1.17","0","shop1111","","","0",NULL"0000-00-00 00:00:00","0","0","","","","","","","","0","0",NULL"","","1","","","","10020","50086",
"383","3","1","0","75","0","2007-10-17 21:10:27","shop2222","shop2222","0","573","0","","E","0.0","0","0",NULL"2007-10-18 16:14:29","1","0","192.168.1.17","0","shop2222","","","0",NULL"0000-00-00 00:00:00","0","0","","","","","","","","0","0",NULL"","","1","","","","10010","50032",
"381","3","1","0","75","0","2007-10-17 20:29:20","shop3333","shop3333","0","533","0","","E","0.0","0","0",NULL"2007-10-18 16:14:48","0","0","192.168.1.17","0","shop3333","","","0",NULL"0000-00-00 00:00:00","0","0","","","","","","","","0","0",NULL"","","1","","","","10025","50104",
done returning result set data
getting command...
done getting command
identify
getting command...
getting command failed: client sent bad command or timed out
end session
ending session...
aborting all busy cursors...
jzhang
2007-10-19
|