Warning: Table '.\dcgforum\cache_page' is marked as crashed and should be repaired query: SELECT data, created, headers, expire FROM cache_page WHERE cid = 'http://forums.dataphor.org/index.php?q=node/28' in C:\Sites\DCGForum\includes\database.mysql.inc on line 172
Connection pool size | Dataphor Forums

Connection pool size

When the number of users of my database increased from around five to around ten, we started to get error messages like the one below. How do I increase this connection pool size? (And why is it apparently set so low?)

Application:500000 --->
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
Application:127105 --->
Exceptions occurred while executing SQL command.
---- Details ----
Exceptions occurred while executing SQL command: "connect"
---- Server Context ----
at Alphora.Dataphor.DAE.Connection.SQLConnection.WrapException(Exception AException, String AStatement, Boolean AMustThrow)
at Alphora.Dataphor.DAE.Connection.DotNetConnection..ctor(String AConnectionString)
at Alphora.Dataphor.DAE.Connection.Oracle.OracleConnection..ctor(String AConnection)
Application:500000 --->
Exception has been thrown by the target of an invocation.
---- Server Context ----
at Alphora.Dataphor.DAE.Schema.DeviceSession.Execute(DevicePlan ADevicePlan)
at Alphora.Dataphor.DAE.Server.ServerProcess.DeviceExecute(Device ADevice, PlanNode APlanNode)
at Alphora.Dataphor.DAE.Runtime.Instructions.TableNode.ProtectedExecute(ServerProcess AProcess)
at Alphora.Dataphor.DAE.Runtime.Instructions.PlanNode.StandardExecute(ServerProcess AProcess)
Application:104229 --->
Runtime error: Exception has been thrown by the target of an invocation.
---- Details ----
Exception occurred while executing the following code: ( .Hunt.Base.DataphorUser where true )
---- Server Context ----
at Alphora.Dataphor.DAE.Runtime.Instructions.PlanNode.StandardExecute(ServerProcess AProcess)
at Alphora.Dataphor.DAE.Server.ServerCursorBase.InternalOpen()
at Alphora.Dataphor.DAE.Server.ServerCursorBase.Open()
at Alphora.Dataphor.DAE.Server.RemoteServerExpressionPlan.Open(RemoteParamData& AParams, TimeSpan& AExecuteTime, ProcessCallInfo ACallInfo)

Setting Connection Pool Size

Hi Jon,

Here is an example of a device creation script that sets the connection pool size for an MSSQL connection:

create device Main
reconciliation { mode = { command }, master = device }
class "MSSQLDevice"
attributes
{
"UseIntegratedSecurity" = "true",
"ServerName" = ".",
"DatabaseName" = "Public",
"ConnectionParameters" = "Max Pool Size=400"
};

I'm not sure if this same parameter specifically will work for the OracleConnection, but it should given that they are both .NET connections and the connection pool size is a service of the ADO.NET layer. If it doesn't, the same idea holds, it would just be a different parameter name that the Oracle connection would recognize, it would still be set using the ConnectionParameters attribute of the device.

Regards,
Bryn Rhodes
Database Consulting Group LLC


Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Table &amp;#039;.\\dcgforum\\cache_page&amp;#039; is marked as crashed and should be repaired\nquery: LOCK TABLES cache_page WRITE</em> in <em>C:\\Sites\\DCGForum\\includes\\database.mysql.inc</em> on line <em>172</em>.', 2, '', 'http://forums.dataphor.org/index.php?q=node/28', '', '54.196.190.32', 1542384505) in C:\Sites\DCGForum\includes\database.mysql.inc on line 172

Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Table &amp;#039;.\\dcgforum\\cache_page&amp;#039; is marked as crashed and should be repaired\nquery: UPDATE cache_page SET data = &amp;#039;\\0\\0\\0\\0\\0\\0Yr6Nԙ1IYN[ǖ:xI;ٝN\\&amp;#039;\\rI0\\0hYf/8}= (J~3@\\r&amp;gt;~qtLON Q_ߟ^&amp;lt;;cDby] 3ڏ|w#fvhg3 &amp;amp;\\rF_XBWE^G-Y9  ,#ar&amp;gt;:e#d 9hÿVeRRՅnu򷵸bxi‹EH00$Sam^\\0 P&amp;lt;\\Z)6 pk\\0aOEu&amp;lt;c\\nH_O%#\\0t(،Wۅ9m9oVX(x*0`y~E! D)-&amp;gt;y0Іqʧ΍K\\0֚+%#K%(}@Kr\\\\2T4?ܛ&amp;amp;{ѡJDin۾_EnNaBnO in C:\Sites\DCGForum\includes\database.mysql.inc on line 172

Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Incorrect string value: &amp;#039;\\x8B\\x08\\0\\0...&amp;#039; for column &amp;#039;session&amp;#039; at row 1\nquery: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES (&amp;#039;88im10gkktcs49e7b1evb8dbe1&amp;#039;, 0, 0, &amp;#039;54.196.190.32&amp;#039;, &amp;#039;messages|a:1:{s:5:\\&amp;quot;error\\&amp;quot;;a:2:{i:0;s:195:\\&amp;quot;user warning: Table &amp;amp;#039;.\\\\dcgforum\\\\cache_page&amp;amp;#039; is marked as crashed and should be repaired\\nquery: LOCK TABLES cache_page WRITE in C:\\\\Sites\\\\DCGForum\\\\includes\\\\database.mysql.inc on line 172.\\&amp;quot;;i:1;s:3259:\\&amp;quot;user warning: Table &amp;amp;#039;.\\\\dcgforum\\\\cache_page&amp;amp;#039; is mark in C:\Sites\DCGForum\includes\database.mysql.inc on line 172