{"action":"opened","issue":{"url":"https://api.github.com/repos/sbadugu/sbadugu/issues/33","labels_url":"https://api.github.com/repos/sbadugu/sbadugu/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/sbadugu/sbadugu/issues/33/comments","events_url":"https://api.github.com/repos/sbadugu/sbadugu/issues/33/events","html_url":"https://github.com/sbadugu/sbadugu/issues/33","id":54603199,"number":33,"title":"JMS 4.0.7 Xamarin Android: .NET initial connection failure - buffer fills very slowly with new data to read ","user":{"login":"satishbadugu","id":10148183,"avatar_url":"https://avatars.githubusercontent.com/u/10148183?v=3","gravatar_id":"","url":"https://api.github.com/users/satishbadugu","html_url":"https://github.com/satishbadugu","followers_url":"https://api.github.com/users/satishbadugu/followers","following_url":"https://api.github.com/users/satishbadugu/following{/other_user}","gists_url":"https://api.github.com/users/satishbadugu/gists{/gist_id}","starred_url":"https://api.github.com/users/satishbadugu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satishbadugu/subscriptions","organizations_url":"https://api.github.com/users/satishbadugu/orgs","repos_url":"https://api.github.com/users/satishbadugu/repos","events_url":"https://api.github.com/users/satishbadugu/events{/privacy}","received_events_url":"https://api.github.com/users/satishbadugu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-16T17:41:01Z","updated_at":"2015-01-16T17:41:01Z","closed_at":null,"body":"An XML representation of a search request<p><b>Client technology:</b> .NET/Xamarin<br/>\n<b>Browser with Version:</b> n/a<br/>\n<b>Client O/S with Version:</b> Android 4.4.2<br/>\n<b>Same-origin / Cross-origin?</b> n/a</p>\n\n<p>*Gateway with version: * JMS Edition (4.0.7.529 Beta)<br/>\n<b>Gateway Java version:</b> 1.7.0_71-b14<br/>\n<b>Server OS with version:</b> 1.7.0_71-b14<br/>\n<b>Gateway Service:</b> jms</p>\n\n<p><b>Observed behaviour:</b><br/>\nConnection randomly fails. When I debug the issue down I found that when HttpRequest.BeginRead method being called it gets stuck there for a few seconds after which Connection Timer gets fired in 5 seconds and connection will be closed. I checked the wireshark and I can see that gateway is sending the data.</p>\n\n<p/>\n<div id=\"syntaxplugin\" class=\"syntaxplugin\" style=\"border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;\">\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" style=\"font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;\">\n\t\t<tbody  >\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">09:36:13.401: HttpRequest: thread(6) OpenHandler: Entering [3]</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;   width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">09:36:13.402: HttpRequest: thread(6) Status Code: OK [3]</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;   width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">09:36:13.402: HttpRequest: thread(6) OnOpen: Firing Open Event [3]</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;   width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">09:36:13.402: EmulatedHttpRequest: thread(6) RequestReady: OpenHandler [3]</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;   width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">09:36:13.402: HttpRequest: thread(6) BeginRead [3]</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t\t<tr id=\"syntaxplugin_code_and_gutter\">\n\t\t\t\t\t\t<td  style=\" line-height: 1.4em !important; padding: 0em; vertical-align: top;\">\n\t\t\t\t\t<pre style=\"font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;\"><span style=\"color: black; font-family: 'Consolas', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important;\">12/28/2014 9:36:16 AM Connect Timer fired\n</span></pre>\n\t\t\t</td>\n\t\t</tr>\n\t\t\t</tbody>\n</table>\n</div>\n<p/>\n\n<p>This issue does not really reproduce in device so I guess this is got something with performance as well. </p>\n\n<p>So people are facing the same issue as well. <br/>\n<a href=\"http://forums.xamarin.com/discussion/15474/tcpclient-buffer-fills-very-slowly-with-new-data-to-read\" class=\"external-link\" rel=\"nofollow\">http://forums.xamarin.com/discussion/15474/tcpclient-buffer-fills-very-slowly-with-new-data-to-read</a> as workaround they are trying reading the stream synchronously and just experimenting with adding a delay in the loop or some forums suggesting to use AsyncRead instead of BeginRead.</p>\n\n<p>I have tried to increase timeout but it switches to long pulling not sure if it is right way of doing it.</p>\n\n--------------------------------------------------\nImported from JIRA\nOriginally reported by: Akram Yakubov"}}