Intermittant Exceptions On Save - database

We have been investing heavily in 2sxc for a client with a large site. We've built a number of custom apps and added quite a few content types to the default Content App.
About a month ago we started seeing slowness when saving front end data and saving ContentTypes in the Content App (but only there). The site would take 20 - 30 seconds to save. Now it's gotten worse and started throwing exceptions intermittently. Save is no faster than 30 seconds. At other times it's 60 seconds. Intermittently the content fails to save and we get the error message and exceptions listed below.
However we have no problems saving content within other apps like the Blog app and our custom apps. Performance there is fine. Also 2sxc modules in general seem to render fine for front end users.
We are running 2sxc 8.4.5 on DNN 7.4.2.
Here is the initial Error Message:
Had an error talking to the server (status 400)
Message: Bad Request
Detail: Error getting List of Stream.
Stream Name: Default
DataSource Name: QuickCache
Failed to load resource: the server responded with a status of 400 (Bad Request)
POST [removed]/en-us/desktopmodules/2sxc/api/eav/entities/savemany?appId=2 400 (Bad Request)
(anonymous) # VM2141:2
(anonymous) # set.min.js?sxcver=8.9.1.13916:103
n # set.min.js?sxcver=8.9.1.13916:99
(anonymous) # set.min.js?sxcver=8.9.1.13916:96
(anonymous) # set.min.js?sxcver=8.9.1.13916:131
$eval # set.min.js?sxcver=8.9.1.13916:145
$digest # set.min.js?sxcver=8.9.1.13916:142
$apply # set.min.js?sxcver=8.9.1.13916:146
(anonymous) # set.min.js?sxcver=8.9.1.13916:276
Sf # set.min.js?sxcver=8.9.1.13916:37
d # set.min.js?sxcver=8.9.1.13916:37
There are two exceptions that appear in the DNN Event Log. Both of them appear twice for each failure to save.
General Exception
AbsoluteURL:/en-us/desktopmodules/2sxc/api/eav/entities/savemany
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:7888b675-2f38-4664-96ab-786b27b3406c
AssemblyVersion:
PortalId:-1
UserId:-1
TabId:-1
RawUrl:
Referrer:
UserAgent:
ExceptionHash:QVy9pjR7G9IFD3vpE650/A==
Message:Error getting List of Stream. Stream Name: Default DataSource Name: QuickCache
StackTrace:
at ToSic.Eav.DataSources.DataStream.get_LightList() in C:\Projects\eav-server\ToSic.Eav.DataSources\DataStream.cs:line 143
at ToSic.Eav.DataSources.BaseDataSource.get_LightList() in C:\Projects\eav-server\ToSic.Eav.DataSources\BaseDataSource.cs:line 132
at ToSic.Eav.Import.Import.RunImport(IEnumerable`1 newAttributeSets, IEnumerable`1 newEntities) in C:\Projects\eav-server\ToSic.Eav\ImportExport\Import.cs:line 71
at ToSic.Eav.WebApi.EntitiesController.SaveMany(Int32 appId, List`1 items) in C:\Projects\eav-server\ToSic.Eav.WebApi\EntitiesController.cs:line 204
at ToSic.SexyContent.EAVExtensions.EavApiProxies.EntitiesController.SaveMany(Int32 appId, List`1 items) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\WebApi\EavApiProxies\EntitiesController.cs:line 109
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.b__c(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.<>c__DisplayClass5.b__4()
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)
InnerMessage:An error occurred while executing the command definition. See the inner exception for details.
InnerStackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at ToSic.Eav.BLL.DbLoadIntoEavDataStructure.GetAppDataPackage(Int32[] entityIds, Int32 appId, IDeferredEntitiesList source, Boolean entitiesOnly) in C:\Projects\eav-server\ToSic.Eav\BLL\DbLoadIntoEavDataStructure.cs:line 179
at ToSic.Eav.DataSources.SqlSources.EavSqlStore.GetDataForCache(IDeferredEntitiesList targetCacheForDeferredLookups) in C:\Projects\eav-server\ToSic.Eav\DataSources\SqlSources\EavSqlStore.cs:line 68
at ToSic.Eav.DataSources.Caches.BaseCache.EnsureCache() in C:\Projects\eav-server\ToSic.Eav.DataSources\Caches\BaseCache.cs:line 126
at ToSic.Eav.DataSources.Caches.BaseCache.GetList() in C:\Projects\eav-server\ToSic.Eav.DataSources\Caches\BaseCache.cs:line 46
at ToSic.Eav.DataSources.DataStream.get_LightList() in C:\Projects\eav-server\ToSic.Eav.DataSources\DataStream.cs:line 135
Source:ToSic.Eav.DataSources
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:
Page Load Exception
AbsoluteURL:/Default.aspx
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:c5449323-0a0a-486f-98cd-9849243fff19
AssemblyVersion:7.4.2
PortalId:0
UserId:-1
TabId:56
RawUrl:/en-us/
Referrer:http://www.cui.edu/en-us/
UserAgent:Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13F69 Safari/601.1
ExceptionHash:301KQ/ilLzYrwILN4yfdXA==
Message:Error getting List of Stream. Stream Name: Default DataSource Name: PublishingFilter
StackTrace:
InnerMessage:Error getting List of Stream. Stream Name: Default DataSource Name: PublishingFilter
InnerStackTrace:
at ToSic.Eav.DataSources.DataStream.get_List() in C:\Projects\eav-server\ToSic.Eav.DataSources\DataStream.cs:line 98
at ToSic.Eav.DataSources.BaseDataSource.get_List() in C:\Projects\eav-server\ToSic.Eav.DataSources\BaseDataSource.cs:line 127
at ToSic.SexyContent.ContentGroup.get_Template() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ContentGroup.cs:line 71
at ToSic.SexyContent.ContentBlock.ModuleContentBlock..ctor(ModuleInfo moduleInfo, IEnumerable`1 overrideParams) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\SexyContent\ContentBlock\ModuleContentBlock.cs:line 77
at ToSic.SexyContent.View.get_SxcI() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\View.ascx.cs:line 18
at ToSic.SexyContent.View.get_UserMayEditThisModule() in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\View.ascx.cs:line 90
at ToSic.SexyContent.View.Page_Load(Object sender, EventArgs e) in C:\Projects\2SexyContent\Web\DesktopModules\ToSIC_SexyContent\View.ascx.cs:line 28
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Source:
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:

Thanks to Raphael Müller this issue has been solved. He suggested rebuilding indexes on the database. Once that was done the content saves went from 45 seconds plus with timeouts down to 1.5 seconds. Boy is my face red. Oh well live and learn. The lesson is simple: Make sure your database has a maintenance plan that includes the rebuilding of indexes.
Here are some helpful links for those who might encounter this issue.
Here is a script to rebuild all indexes in a database. In theory the script should not lock your database or website but anything is possible so it's best to execute off hours. It took 5 minutes to run on my DNN database which is around 2.5 Gb. https://gallery.technet.microsoft.com/scriptcenter/Script-for-rebuilding-all-8d079754
Michelle Ufford's Index Defrag Script is an advanced solution. I've run it on my stage server successfully and it seems to be well received by the community. http://sqlfool.com/2011/06/index-defrag-script-v4-1/
Here is a helpful discussion on how often to schedule your index rebuilds. How Often should the indexes be re-build in sql-server DB?

Related

Migrated SSRS Server will not load reports

I started this process back in November with this question: How to migrate an existing SSRS setup to a new server?
I was able to migrate everything to the new server without any issues. There were no errors on any of the tabs in the Report Server Configuration Manager. And the Reporting Service started with out errors. I was able navigate the expected "directory" structure through the web interface. However, when I tried to execute a report, upload a report or manage the report I received an error dialog that read "An error has occurred. Something went wrong. Please try again later." This isn't the most helpful error, so I went to the Report Service error log and found this exception in the log:
Microsoft.ReportingServices.Portal.WebHost!reportserverwebapp!4a!03/02/2019-12:44:39:: e ERROR: [c4tdsgh8]: OData exception occurred: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.SqlServer.ReportingServices2010.ReportingService2010.IsSSLRequired()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetConnectionProtocol()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod()
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetItemDefinition(String itemPath, Byte[] definition, Property[] properties)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapRS2010Proxy.<>c__DisplayClass14.<SetItemDefinition>b__13()
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithCorrespondingAuthMechanism[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapRS2010Proxy.SetItemDefinition(IPrincipal userPrincipal, String itemPath, Byte[] definition, Property[] properties)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.UpdateReport(IPrincipal userPrincipal, String origItemPath, Report item, Boolean renameOrMove, String[] delta)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.Update(IPrincipal userPrincipal, Guid key, CatalogItem catalogItem, String[] delta)
at Microsoft.ReportingServices.Portal.ODataWebApi.V1.Controllers.CatalogItemsController.PutEntity(String key, CatalogItem entity)
at Microsoft.ReportingServices.Portal.ODataWebApi.V1.Controllers.Reflection.EntitySetReflectionODataController`1.Put(ODataPath oDataPath, T value)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext().
I spent a few hours looking this error up with no solution. It could be that I was pretty fried and I missed something, but any guidance would be appreciated.
You may find its faster to create a SSRS project in SSDT, import the reports and redeploy them. You may have to recreate the data sources but in my experience this is the fastest way to get it done.

Composite c1 upgrade from 4.0 to 4.2 update 1

I've just upgraded from 4.0 to 4.2 update 1. Now i got an error as soon as I try to open a page:
System.FormatException: Unrecognized Guid format. at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)
at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)
at System.Guid..ctor(String g)
at CompositePageContentEditor.PageContentEditor.get_SelectedTemplateId() in c:\Development\ValaLocal\website\Composite\controls\FormsControls\FormUiControlTemplates\Customized\PageContentEditor.ascx.cs:line 14
at CompositePageContentEditor.PageContentEditor.SetUpTextAreas(Boolean flush) in c:\Development\ValaLocal\website\Composite\controls\FormsControls\FormUiControlTemplates\Customized\PageContentEditor.ascx.cs:line 71
at CompositePageContentEditor.PageContentEditor.InitializeViewState() in c:\Development\ValaLocal\website\Composite\controls\FormsControls\FormUiControlTemplates\Customized\PageContentEditor.ascx.cs:line 60
at Composite.Plugins.Forms.WebChannel.CustomUiControls.TemplatedPageContentEditorUiControl.InitializeViewState()
at Composite.Plugins.Forms.WebChannel.UiControlFactories.TemplatedContainerUiControl.InitializeViewState()
at Composite.Plugins.Forms.WebChannel.UiControlFactories.TemplatedContainerUiControl.InitializeViewState()
at Composite.Plugins.Forms.WebChannel.UiControlFactories.TemplatedContainerUiControl.InitializeViewState()
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at Composite_Management_FlowUi.Page_Load(Object sender, EventArgs e) in c:\Development\ValaLocal\website\Composite\content\flow\FlowUi.aspx.cs:line 61
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
any help appreciated!
/Johan
The exception happens if the system cannot find any page templates (I made some changes so in the next version there will be a more appropriate exception message).
You should check the server log for additional details. Could be something wrong with the configuration ("/App_Data/Composite/Composite.config" file) or with the templates itself.

Silverlight Unhandled Error

I am getting the following error in Silverlight for one of the users. The target runtime is 4.1.10329.0 and the application is built using Silverlight 4. I don't happen to understand what may be the issue. Looks like it is trying to load something on LoadComponent and failing:
Message: Unhandled Error in Silverlight Application
Parser_CreateFromValue_CannotConvertInitializationText]
Arguments: PropertyChanged,System.Windows.Data.UpdateSourceTrigger
Debugging resource strings are unavailable. Often the key and arguments provide
sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?
linkid=106663&Version=4.1.10329.0&File=System.Windows.dll&Key=
Parser_CreateFromValue_Cannot ConvertInitializationText
[Line: 582 Position: 273] at
System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at Samplexxx.MainPage.InitializeComponent()
at Samplexxx.MainPage..ctor()
at Samplexxx.App.Application_Startup(Object sender, StartupEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate
handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs,
Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Any ideas on what could be the issue?
Open IIS on the server, go to HTTP headers, click on Mime Types, click “Add New” and add the following:
Extension – Mime Type
.xaml – application/xaml+xml
.xap – application/x-silverlight-app
.xbap – application/x-ms-xbap

DNN Module with devxpress controls critical Error

I am using DNN module 5.6.1, and i created a custom module using Devxpress controls,
It is installing in dnn site, but when i try to add the module in a page, i getting the following Error,
A critical error has occurred.
Object reference not set to an instance of an object.
And Log is.........
AssemblyVersion: 5.6.1
PortalID: 0
PortalName: My Website
UserID: 1
UserName: host
ActiveTabID: 63
ActiveTabName: TestDNN
RawURL: /dotnetnuke_new/TestDNN.aspx
AbsoluteURL: /DotNetNuke_New/Default.aspx
AbsoluteURLReferrer: http://senthilkumar.com/dotnetnuke_new/TestDNN.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 (.NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: cd7a06c5-7a69-4ebf-b51e-07f70714bfe6
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: dnn_webrater.ctrlRater.Page_Load
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at dnn_webrater.ctrlRater.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
and after logout and login, it shows the following error on the page
Error: Test Module 1 is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.Modules.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---
Can any one please help me to fix this error
This is a very generic error. You may want to look through your Event Log to see if there are other errors that occur at the same time more related to your specific module. Debugging the module to see what exception is coming from your module can also be helpful, rather than trying to unwind these stack traces that, more than likely, are going to be wild goose chases.
What often happens with DNN is that a module fails while loading, and then other parts of the skin and container fail because the module was never fully setup correctly. These are the NullReferenceException errors that you're seeing.
bdukes said the main things I would guess anyway keep the following problem in mind, too.
another reason for this problem could be a specific servertag used in a dnnwrapper.
for example if you are using telerik wrapper from dotnetnuke but placing telerik controls in this wrappers without having a refference on the telerik assambly.
example:
<dnncontrols:datepicker>
<calendar>
<SpecialDays>
<telerik:calendarDays />
</SpecialDays>
</calendar>
</dnncontrols:datepicker>
If you are doing this you will get a nullreference as you got. This Problem drove me crazy to find it so I decided to post it here.
I hope this will help you.
But at first I would suggest the way bdukes described (this is the normal way to go).
best regards

Need help for IBatis?

I am using IBatis for my applicaiton. I am using IBatis 1.6.1 version.I thought it can handle all operations related to DB connections. But I am having little bit concern about this now. Sometimes I am getting the following error details to my log file,
Message
Unable to open connection to "MySQL, MySQL provider 5.0.8.1".
Source
IBatisNet.DataMapper
Stack
at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString) at IBatisNet.DataMapper.SqlMapSession.OpenConnection() at IBatisNet.DataMapper.Commands.DbCommandDecorator.System.Data.IDbCommand.ExecuteReader() at IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(RequestScope request, ISqlMapSession session, Object parameterObject, Object resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(ISqlMapSession session, Object parameterObject, Object resultObject) at IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObject(ISqlMapSession session, Object parameterObject) at IBatisNet.DataMapper.SqlMapper.QueryForObject(String statementName, Object parameterObject) at Sunya.VideoStreaming.Persistence.SchoolRepository.GetSchoolDetailsByUrl(String SchoolUrl) in D:\SVN\Sprint104\Persistence\SchoolRepository.cs:line 192 at EduVisionBasePage.GetSchoolUrl(School& _school) at ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Message
Too many connections
Source
MySql.Data
Stack
at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.Authenticate411() at MySql.Data.MySqlClient.NativeDriver.Authenticate() at MySql.Data.MySqlClient.NativeDriver.Open() at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at MySql.Data.MySqlClient.MySqlPool.GetConnection() at MySql.Data.MySqlClient.MySqlConnection.Open() at IBatisNet.DataMapper.SqlMapSession.OpenConnection(String connectionString)
Does someone has some idea about the error?
iBATIS has been around for quite a while (2001), and I have my doubts that there's a major bug in the MySQL provider. You mentioned that the error occurs "sometimes" - if it's intermittent, perhaps the problem lies elsewhere. "Unable to open connection" is likely to mean just that. Network errors, database outages, too many unreleased connections, authentication issues, etc. might all cause this error.
If you are using the JDBC transaction manager set the datasource to 'UNPOOLED' in you myBatisConfig.xml
<transactionManager type="JDBC"/>
<dataSource type="UNPOOLED">
.
.
.
</dataSource>
</environment>
That is the short answer. My hunch is The connection pool class is holding connections too long. Lowering the values for 'poolMaximunActiveConnection' and 'poolMaximunIdleConnections' may solve the problem.
Notes: using myBatis 3.0.3 Java, mySql Windows 5.5.9
search terms: iBatis, myBatis, 'Too many connections', mySQL

Resources