Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 170
Registered: ‎07-07-2016
Accepted Solution

Timeout while getting a connection from pool

[ Edited ]

In gmsc2016+postgresql10 while running any workflows the following error appears. Only restart of IIS seems to be helpfull.

What can be the reason?

 

13.04.2018 11:09:29 ERROR - Controller MapState has raised an exception in Action SaveMapState.
System.Exception: Timeout while getting a connection from pool.
at Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection Connection)
at Npgsql.NpgsqlConnection.Open()
at Intergraph.Emea.Data.DatabaseContext..ctor(Database database, Boolean useTransaction)
at Intergraph.Emea.Workflows.WorkflowDatabase.CreateContext(Boolean useTransaction, Boolean ownsContext)
at Intergraph.Emea.SmartClient.Workflows.MapStateController.PersistMapState(MapState mapState)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.<>c__DisplayClass1.<WrapVoidAction>b__0(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Contributor
Posts: 23
Registered: ‎01-31-2018

Re: Timeout while getting a connection from pool

Hi mzebrows,

 

Maybe increasing the minimum/maximum allowed amount of connections in the connection pool or raising the connection timeout (the time, a thread will wait until it gets an idle connection from the pool) will do it.

Contributor
Posts: 33
Registered: ‎11-19-2015

Re: Timeout while getting a connection from pool

Hello,

 

Could you please, suggest the configuration file name in PostGres server responsible  for Connection pool time out ?

 

 

Thank you,

Ervins

Staff
Posts: 950
Registered: ‎10-19-2015

Re: Timeout while getting a connection from pool

Hi Ervins,

 

you can do it in the connection string itself. There are many parameters you can try depending on your specific problem:

 

https://www.npgsql.org/doc/connection-string-parameters.html

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Regular Contributor
Posts: 170
Registered: ‎07-07-2016

Re: Timeout while getting a connection from pool

I'm afraid it's not about postgres configuration file. Probably the problem is somewhere in IIS configuration, but I haven't already checked this. Moreover I've noticed that error appears when we are using GMSC Administrator console (127.0.0.1\GMSC\Administrator). 

Highlighted
Contributor
Posts: 33
Registered: ‎11-19-2015

Re: Timeout while getting a connection from pool

Hi,

we are trying to execute sql trigger, but all time get error "Exception while reading from stream".Configuration of connection string  do not change anything.

 

 <connectionStrings>
	<add name="process" connectionString="Pooling=false;CommandTimeout = 0;Timeout = 6000;ConnectionIdleLifetime = 6000;"/> 
  </connectionStrings>

Our problem description is already posted here.

Maybe we have  similar problem and can be configured in IIS?

Regular Contributor
Posts: 170
Registered: ‎07-07-2016

Re: Timeout while getting a connection from pool

IIS configuration could probably help only for "Timeout while getting a connection from pool" error. 

It looks like GMSC application does not closing connection to database. Of course I'm not sure about this but restarting IIS always help to solve the problem for a time.

Polls
Please register to vote
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.