Re: [Sqlrelay-discussion] "Too many listeners" error
Brought to you by:
mused
From: David M. <dav...@fi...> - 2011-08-11 19:01:50
|
Hello Andrew, The maxlisteners parameter can be tuned to manage that error. SQL Relay opens a set number of connections to the database, then when clients connects to the SQL Relay listener, it hands them off to an available database connection. If there are no available connections, the listener forks off a child which waits until there is an available connection. The maxlisteners parameter controls how many of these forked-off-children can pile up before errors will be thrown. Originally, SQL Relay allowed an unlimited number, but some folks requested that it be possible to place a limit to prevent the system from paging if a lot of clients piled up, so I added that feature. Setting maxlisteners="0" should revert to the original behavior and allow an unlimited number. The appropriate value for that number is application-specific, but 10 would likely be a low number for most applications. Typical situations that cause clients to pile up would be if the database went down for a while or if there are queries that take a long time to run that get triggered regularly. I hope this helps. David Muse dav...@fi... On 07/28/2011 11:41 PM, Andrew L wrote: > Hi, > > I'm using rudiments-0.32 and sqlrelay-0.39.4 . > > I have the following Perl code: > > 1 .... > 2 $stmt = 'begin :cursor := my_func; end;'; > 3 $curs->prepareQuery ($stmt); > 4 $curs->defineOutputBindCursor("cursor"); > 5 $curs->executeQuery() || die "Can't retrieve data from database: > " . $curs->errorMessage(); > 7 .... > > The script dies at line 5 with "Can't retrieve data from database: Too > many listeners" error message. > > Here's what I have in my sqlrelay.conf file: > > <instance id="my_id" port="9000" dbase="oracle8" > connections="5" maxconnections="30" > maxqueuelength="5" > growby="1" ttl="600" > endofsession="rollback" sessiontimeout="600" > runasuser="spock" > runasgroup="vulcan" cursors="10" > authtier="listener" > handoff="pass" deniedips="" allowedips="" > debug="listener_and_connection" > maxquerysize="65536" maxstringbindvaluelength="4000" > maxlobbindvaluelength="71680" idleclienttimeout="5" > maxlisteners="10" listenertimeout="0" > reloginatstart="false"> > > What settings do i need to change to fix the error? > > > Thanks > --Andrew > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com |