We had an Ultralite device running SIS last night with a polling frequency of 1 minute. This has been running without incident for I don't know how long. Last night someone shut down the server being polled.

This morning the device had a huge log file containing 64 "Mobilink communication errors -- code 63, parameter: , system code: 10061". After these logged errors the rest of the log file contains "ULException: Too many open cursors".

Looking through our code after the try there is a finally with select.Dispose(). Which I thought would close the cursor regardless of success/failure. So my only thought is there is something special about calling ml-get-server-notification which isn't closing the cursors.

Does anyone have any ideas what might have happened? Do I need to also assign null to my select statement? Is that needed to help close the cursors? Do the cursors close after 2 minutes and the frequency was simply too fast for automatic closing to take care of it? Is there any underlying issue that if ml-get-server-notification fails it doesn't close the cursor?

The server is using version 12.0.1.3726, for both Mobilink and SQL Anywhere.

The log errors where it switches from mobilink communication error to too many cursors open.

8/26/13 3:31:07 PM-iAnywhere.Data.UltraLite.ULException: MobiLink communication error -- code: 63, parameter: , system code: 10060
at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()
at iAnywhere.Data.UltraLite.ULDataReader.GetRowCount(Int32 threshold)
at iAnywhere.Data.UltraLite.ListSourceBase.InitFromTable()
at iAnywhere.Data.UltraLite.ListSourceBase..ctor(ULDataReader table)
at iAnywhere.Data.UltraLite.ULDataReader..ctor(ULConnection conn, CommandBehavior cmdBehavior, ULCommand parent, IntPtr natRS, ULCursorSchema schema)
at iAnywhere.Data.UltraLite.ULCommand.executeReaderInternal(CommandBehavior cmdBehavior, Boolean readOnly)
at iAnywhere.Data.UltraLite.ULCommand.ExecuteScalar()
at OurCompany.Ultralite.DataCommand.LoadValue()
at OurCompany.Sybase.LightWeightPoller.MobilinkPoller.SISPoll(Object stateInfo)
at System.Threading.Timer.ring()

8/26/13 3:31:23 PM-iAnywhere.Data.UltraLite.ULException: Too many open cursors
at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()
at iAnywhere.Data.UltraLite.ULCommand.executeReaderInternal(CommandBehavior cmdBehavior, Boolean readOnly)
at iAnywhere.Data.UltraLite.ULCommand.ExecuteScalar()
at OurCompany.Ultralite.DataCommand.LoadValue()
at OurCompany.Sybase.LightWeightPoller.MobilinkPoller.SISPoll(Object stateInfo)
at System.Threading.Timer.ring()

The ultralite select statement being called

"select ml_get_server_notification('{0}', 'tcpip{{host={1};port={2}}}', '{3}')"

asked 28 Aug '13, 12:01

Peacock's gravatar image

Peacock
1917817
accept rate: 100%

edited 28 Aug '13, 14:34

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297

For the result of "ml_get_server_notification": which .NET objects are you using to retrieve and store the result set?

(28 Aug '13, 14:52) Jeff Albion

It's a custom built poller. It's a timer calling the polling event. We create ULCommand with the above select statement (the one in the original post) in it use ExecuteScalar().ToString() to retrieve the value, check it for the word sync and raise a SynchronizeEvent with the publication that was returned by the "ml_get_server_notification".

ULCommand select = new ULCommand(string.Format("select ml_get_server_notification('{0}', 'tcpip{{host={1};port={2}}}', '{3}')", _config.Notifier, _config.Address, _config.Port, _config.PollKey), connection, transaction);

string pollResult = select.ExecuteScalar().ToString();
if(pollResult.Contains("[sync]"))
{
    string publication = pollResult.Substring(pollResult.IndexOf(']') + 1);
    OnSynchronizeEvent(new SynchronizeEventArgs(publication));
}

Does that answer your question?

(28 Aug '13, 15:11) Peacock
Replies hidden

Yes, that's great - that certainly helps illustrate the problem a bit more. Can you confirm that during this time, it was only this MobiLink polling thread making calls against the UltraLite database?

(28 Aug '13, 16:11) Jeff Albion

It looks like our standard auto sync was also running at a frequency of 2 minutes. But that's been in the code base for 8 years or so. Never had this problem, SIS was only added a year and a half ago.

8/26/13 3:31:53 PM-iAnywhere.Data.UltraLite.ULException: Too many open cursors
at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()
at iAnywhere.Data.UltraLite.ULCommand.executeReaderInternal(CommandBehavior cmdBehavior, Boolean readOnly)
at iAnywhere.Data.UltraLite.ULCommand.ExecuteScalar()
at OurCompany.Ultralite.DataCommand.LoadValue()
at OurCompany.BusinessObjects.Messages.Message.NewMessages(User currentUser)
at OurCompany.CF.FieldServiceHandheld.MainForm.DisplayNewMessages()
at OurCompany.Screens.FieldService.MainController.SynchFinish(Boolean synchFailed)
at OurCompany.CF.FieldServiceHandheld.MainForm.NonVisualSynchronize()

8/26/13 3:31:53 PM-iAnywhere.Data.UltraLite.ULException: Too many open cursors
at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()
at iAnywhere.Data.UltraLite.ULCommand.executeReaderInternal(CommandBehavior cmdBehavior, Boolean readOnly)
at OurCompany.Ultralite.DataCommand.Load()
at OurCompany.BusinessObjects.FieldService.WorkOrders.WorkOrder.LoadNew(User currentUser)
at OurCompany.CF.FieldServiceHandheld.MainForm.DisplayNewWorkOrders()
at OurCompany.Screens.FieldService.MainController.SynchFinish(Boolean synchFailed)
at OurCompany.CF.FieldServiceHandheld.MainForm.NonVisualSynchronize()

8/26/13 3:31:53 PM-iAnywhere.Data.UltraLite.ULException: Too many open cursors
at iAnywhere.Data.UltraLite.ULConnection.RuntimeErrorCheck()
at iAnywhere.Data.UltraLite.ULCommand.DoExecuteStatement()
at iAnywhere.Data.UltraLite.ULCommand.ExecuteNonQuery()
at OurCompany.Ultralite.DataCommand.Run()
at OurCompany.BusinessObjects.FieldService.WorkOrders.WorkOrder.DeleteUnsynched()
at OurCompany.Screens.FieldService.MainController.SynchFinish(Boolean synchFailed)
at OurCompany.CF.FieldServiceHandheld.MainForm.NonVisualSynchronize()
(29 Aug '13, 08:34) Peacock

Any updates on this?

(03 Sep '13, 08:53) Peacock

If this is an urgent issue, you should open a technical support case with us so that we can interact with you directly and better understand the error and environment details:

http://www54.sap.com/services-support/support.html


If you have a stand-alone reproducible you can post that will show us the error immediately, then please share it so that we can confirm whether this is an issue with the SIS code, or the UltraLite code (interacting with your application).

Otherwise, I am still looking at this issue - it may take some time, based on my other priorities.

(03 Sep '13, 10:46) Jeff Albion

I can't seem to reproduce this issue based on your description with just a disconnected notifier. (I also tried initially connecting with the lightweight poller, then shutting the MobiLink server down).

I assume you're just repeatedly catching and ignoring the generated exceptions...? What else happens in your error handler when you see an exception like this? Here is what I tried:

while (true) {
    try
    {
        ULCommand select = new ULCommand("SELECT ML_GET_SERVER_NOTIFICATION('Notifier1', 'tcpip{host=localhost;port=2439}', 'MyKey')", ulconn);
        string pollResult = select.ExecuteScalar().ToString();
        if (pollResult.Contains("[sync]")){
            Console.Out.WriteLine("Synchronizing!");
        }
    } catch (Exception ex) { }
}
(06 Sep '13, 17:53) Jeff Albion
showing 4 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371
×2

question asked: 28 Aug '13, 12:01

question was seen: 6,524 times

last updated: 06 Sep '13, 18:34