cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
777
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Stephan Steiner on 15-10-2013 02:44:06 AM
I had to create a couple hundred unity connection boxes using the .NET API last week-end. and I ran into an issue setting the pin in perhaps 5% of all boxes. For those 5%, I get the following error back from the cuc server: <ErrorDetails><errors><code>IMS_ERROR</code><message>Database communication error</message><DetailCode>-1</DetailCode></errors></ErrorDetails>

All users get the same default pin, pin policy is set to allow this - so I'm wondering.. have I just found a timing bug? I went ahead and re-introduced mailbox extraction after create (and setting the pin) to ensure the box is really created, but to no avail. Only adding a couple of seconds of delay in between box creation and setting the pin seems to do the trick (though I cannot be 100% sure since most of the boxes were created when I had the issue)

Subject: RE: database communication error setting pin
Replied by: Jeff Lindborg on 15-10-2013 10:23:17 AM
sounds like a timing issue - there's a whole series of triggers that fire when a user is created (more than other object types given the external references on the mailstore, UM links, notification engine registration, name grammar flags for ASR etc... etc....) - I can easily see the HTTP response coming back while those are still filtering through - I'll setup some scripts to see if I can repro and open a bug for the API team if that's the case.

Subject: RE: database communication error setting pin
Replied by: Jeff Lindborg on 15-10-2013 08:42:46 PM
hmmm... did a quick test today against Connection 9.1 - I created 500 users and directly after each create I updated the PIN for each user - all 500 went through fine without issue.  What version are you testing against and can you verify a simple loop of code to make sure I'm doing the same test?  I just create a simple for loop for 500 iterations that uses the UserBase add user method and returns a user full object which I then turn around and issue the resetPin method against and then press on to the next user.  Is there more going on?  I'll try a 10.0 build just in case you're working with EFT code or the like but right off hand nothing's jumping out at me on my test setup.

Subject: RE: database communication error setting pin
Replied by: Stephan Steiner on 16-10-2013 03:17:26 AM
 I'm working against is 9.1.2.10000-10
The code I'm using is this (by the way... do you know how I can type a newline without entering source mode? It drives me crazy)
And I don't seem how to paste code in proper formatting either so I pasted it here http://pastie.org/private/buzjxk186vhonbdwgwjg . I hope I copied enough to make it understandable. Comment out the sleep code as I only added this later on and I cannot be 100% sure it is what caused the issue. As you may guess from my Operation having a rollback collection, those are executed if an operation fails (restoring initial state)... my app tries every top level operation 3 times, and the pin/password setting generally worked on the second attempt. You'll see that I implemented server hopping (customer has two servers), though all operations were run against the primary server of the cluster when I ran them. And there was no load on the system - it was a Saturday, and the productive voicemail system was another (we're moving over int he next couple of days).

Subject: RE: database communication error setting pin
Replied by: Jeff Lindborg on 18-10-2013 07:12:31 PM
The formatting on this site can be a bit annoying for sure - I've tried hitting the "source" button and it seems to allow newline characters in that mode even if it looks a little funny.

I've run several tests and simply cannot replicate what you're seeing - there's nothing terribly odd about your code I can see and I've tried creating 500 users with the method you're using (i.e. create it passing in name/value pairs via the property list but not creating a userFull object to pass back) and updating the PIN in the same exact way - I've also tried creating the user and getting the UserFull object back and updating the PIN off of that which amounts to the same thing but goes a little slower given the extra fetch necessary for creating the UserFull object.

For reference the total time to create 500 users by method 1 (no UserFull object) was 440 seconds, by method 2 was 550 seconds - if that gives you any indication of the platforms I'm using.

I tried against 9.1 and 10.0 builds with about the same results (no errors in either case) - so I can't point to anything wrong at a system level at any rate.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links