Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

New Developer
Posts: 14
Registered: ‎04-15-2009
My Device: Not Specified

MDS Push messages and MDS-CS server response time

So I have an app that is sending push messages out to phones based on a particular input event. The messages are sent from a .NET service through an MDS-CS server running v4.1.7.16 to phones running a range of OS's (4.5+ though) 


I'm seeing, pretty often, that the message delivery is delayed by anywhere from 10-60 seconds. I’ve narrowed down the issue and it appears that the slowdown is in the response time of the MDS server. I put some additional logging (on the .NET service side) in for pre-connect to the web server and post-send of message with messages that are under 8K – so the time to send should be a fraction of a second, and often it is.



What I’ve found is that messages aren’t sent until the MDS server responds to the HTTP request (makes sense – it can’t send a message I haven’t made a request for) – but that HTTP response takes anywhere from a fraction of a second to up to 30-60 seconds at times. It doesn’t appear to relate to message size or time of day or anything else I can find as a pattern on my side. It appears almost as if the server is throttling connections or just has times (usually this is about 50% of the time there is some significant delay) where the response is quite slow.


Are there any settings, maybe a throttling setting or a max concurrent HTTP connections setting that may be causing this? 


Below are a couple of examples of the HTTP POST sent to the MDS-CS server and the response back:





TIME: [2/11/2010 2:34:52 PM]
MESSAGE: ThreadId: 25 Sending message to http://uusnwa41.na.utcmail.com:8080/push?DESTINATION=30b18f3c&PORT=6363&REQUESTURI=/: <?xml version="1.0" encoding="utf-16"?>
  <PanelName>Panel 2- LNL-2220 in Dist.lab</PanelName>
  <DeviceName>ENTRM144 Training Center Entry</DeviceName>
  <EventDescription>Request to Exit - Door Not Used</EventDescription>


TIME: [2/11/2010 2:34:52 PM]


MESSAGE: ThreadId: 25 Sending message to http://uusnwa41.na.utcmail.com:8080/push?DESTINATION=30b18f3c&PORT=6363&REQUESTURI=/


<?xml version="1.0" encoding="utf-16"?><EventDetails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.xxx.com">  <EventTime>2010-02-11T14:34:52</EventTime>  <EventTimeString>2:34:52P</EventTimeString>  <EventDateString>2/11/2010</EventDateString>  <PanelName>Panel 2- LNL-2220 in Dist.lab</PanelName>  <PanelID>14</PanelID>  <DeviceName>Training Center Entry</DeviceName>  <BadgeID>0</BadgeID>  <IssueCode>0</IssueCode>  <EventDescription>Request to Exit - Door Not Used</EventDescription>  <Priority>50</Priority>  <SerialNumber>1264720391</SerialNumber>  <CommServerHostname>xxxxx</CommServerHostname>  <EventTypeID>4</EventTypeID>  <EventSubTypeID>575</EventSubTypeID>  <DeviceID>2</DeviceID>  <SecondaryDeviceID>0</SecondaryDeviceID></EventDetails>


and then the response 30 seconds later:


TIME: [2/11/2010 2:35:22 PM]


MESSAGE: ThreadId: 25 Message sent successfully.




The code in between these two log messages is (s = a string containing the message data being sent)




Log.Dbg("Sending message to " + req.RequestUri.ToString() + ": " + s);




                s2 = req.GetRequestStream();

                s2.Write(bytes, 0, bytes.Length);



            catch { return false; }



                if (s2 != null)



                    s2 = null;




            Log.Dbg("Message sent successfully.");



The call to req.GetRequestStream() is what opens the connection to the MDS Server and that call is the one that hangs for up to a minute waiting on the MDS server to respond so I can POST the data.



Any thoughts on settings that may affect this response speed?





BlackBerry Development Advisor
Posts: 15,805
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: MDS Push messages and MDS-CS server response time

The first task is to narrow down where the delay is occurring. 


Have you tried running the push application from a different machine/location?  Have you tried running a different push application from that machine that runs your .NET push application?  I recommend trying either the httppushdemo (requires a reliable port be configured on your BES) or the browserpushdemo included with the BlackBerry JDE and BlackBerry Java Plug-in for Eclipse.  They can be found in the following directories:






C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\samples\com\rim\samples\server


Do you see any delay if you use an MDS-CS Simulator and BlackBerry Smartphone simulator running on both the same or different machine as the .NET push application?


Post the results of these tests.  It should help t narrow down whether the delay occurs in the MDS-CS server, push application server or the push application itself.  Once we have that figured out we can dig a bit deeper.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.