{"action":"created","issue":{"url":"https://api.github.com/repos/Redth/PushSharp/issues/155","repository_url":"https://api.github.com/repos/Redth/PushSharp","labels_url":"https://api.github.com/repos/Redth/PushSharp/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/Redth/PushSharp/issues/155/comments","events_url":"https://api.github.com/repos/Redth/PushSharp/issues/155/events","html_url":"https://github.com/Redth/PushSharp/issues/155","id":13233286,"number":155,"title":"too many \"The maximum number of Send attempts to send the notification was reached!\"","user":{"login":"jjangg96","id":927149,"avatar_url":"https://avatars.githubusercontent.com/u/927149?v=3","gravatar_id":"","url":"https://api.github.com/users/jjangg96","html_url":"https://github.com/jjangg96","followers_url":"https://api.github.com/users/jjangg96/followers","following_url":"https://api.github.com/users/jjangg96/following{/other_user}","gists_url":"https://api.github.com/users/jjangg96/gists{/gist_id}","starred_url":"https://api.github.com/users/jjangg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjangg96/subscriptions","organizations_url":"https://api.github.com/users/jjangg96/orgs","repos_url":"https://api.github.com/users/jjangg96/repos","events_url":"https://api.github.com/users/jjangg96/events{/privacy}","received_events_url":"https://api.github.com/users/jjangg96/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Redth/PushSharp/labels/need%20more%20info","name":"need more info","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2013-04-16T06:36:29Z","updated_at":"2016-10-01T15:42:41Z","closed_at":"2013-05-30T00:14:47Z","body":"I usually send 1000 messages a minute.\r\nIt seems work well, but sometime there is sending problem without any notify message, then I have to re run programs.\r\n\r\nI recently change setting value.\r\nPushServiceSettings pushSetting = new PushServiceSettings();\r\npushSetting.AutoScaleChannels = true;\r\npushSetting.MaxNotificationRequeues = 10;\r\npushSetting.MaxAutoScaleChannels = 256;\r\npushSetting.NotificationSendTimeout = 60000;\r\n\r\nStill have \"The maximum number of Send attempts to send the notification was reached!\" problem 5~10 times a minute, not always.  \r\nI have 2 PushBroker instance threads. Does it any relation?\r\n\r\nThank you for reading.\r\n\r\n![ 2013-04-16 3 39 16](https://f.cloud.github.com/assets/927149/384667/6bba3e9c-a660-11e2-945e-503942a787af.png)"},"comment":{"url":"https://api.github.com/repos/Redth/PushSharp/issues/comments/250918973","html_url":"https://github.com/Redth/PushSharp/issues/155#issuecomment-250918973","issue_url":"https://api.github.com/repos/Redth/PushSharp/issues/155","id":250918973,"user":{"login":"suja-balan","id":18480383,"avatar_url":"https://avatars.githubusercontent.com/u/18480383?v=3","gravatar_id":"","url":"https://api.github.com/users/suja-balan","html_url":"https://github.com/suja-balan","followers_url":"https://api.github.com/users/suja-balan/followers","following_url":"https://api.github.com/users/suja-balan/following{/other_user}","gists_url":"https://api.github.com/users/suja-balan/gists{/gist_id}","starred_url":"https://api.github.com/users/suja-balan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suja-balan/subscriptions","organizations_url":"https://api.github.com/users/suja-balan/orgs","repos_url":"https://api.github.com/users/suja-balan/repos","events_url":"https://api.github.com/users/suja-balan/events{/privacy}","received_events_url":"https://api.github.com/users/suja-balan/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T15:42:41Z","updated_at":"2016-10-01T15:42:41Z","body":"@ogborstad @Redth \r\nHi all\r\nIam a .net developer and for push notification iam using Pushsharp 2.2.1.0 .For android it is working fine and the issue is in IOS.\r\n    #region Iphone push notification\r\n                    //IPhone push notification\r\n                    if (iOSTokenList != null && iOSTokenList.Any())\r\n                    {\r\n                        ////sandbox = true in production environment. In development set \"sandbox = false\"\r\n                        string p12File = WebConfigurationManager.AppSettings[\"notificationCertificateName\"].ToString();   //Certificate name\r\n                        string p12FilePassword = WebConfigurationManager.AppSettings[\"notificationPassword\"].ToString(); ;  //Password\r\n                        string isProductionFlag = WebConfigurationManager.AppSettings[\"notificationIsProduction\"].ToString();  //Production/Sandbox true=Production,false=sandbox\r\n\r\n                        bool isProduction = true;\r\n                        bool.TryParse(isProductionFlag, out isProduction);\r\n                        String p12Filename = HostingEnvironment.MapPath(\"~/\" + p12File); ;\r\n\r\n                        var settings = new PushServiceSettings();\r\n                        settings.AutoScaleChannels = false;\r\n                        settings.MaxAutoScaleChannels = 20;\r\n                        settings.MinAvgTimeToScaleChannels = 100;\r\n                        settings.Channels = 1;\r\n                        settings.MaxNotificationRequeues = 25;\r\n                        settings.NotificationSendTimeout = 15000;\r\n                        //settings.IdleTimeout = TimeSpan.FromMinutes(5);\r\n\r\n                        push.RegisterAppleService(new ApplePushChannelSettings(isProduction, p12Filename, p12FilePassword, true), settings);\r\n                        var pushPayload = new AppleNotificationPayload();\r\n                        //  pushPayload.AddCustom(\"PayLoad\", ApplePayload);\r\n                        foreach (var iosDeviceToken in iOSTokenList)\r\n                        {\r\n                            if (iosDeviceToken != null && !string.IsNullOrWhiteSpace(iosDeviceToken.DEVICE_ID) && iosDeviceToken.DEVICE_ID.Length == 64)\r\n                            {\r\n                                try\r\n                                {\r\n                                    var alertNotification = new AppleNotification()\r\n                                    .ForDeviceToken(iosDeviceToken.DEVICE_ID)\r\n                                    .WithAlert(iosDeviceToken.SUBJECT)\r\n                                    .WithSound(\"default\");\r\n                                    //.WithPayload(pushPayload);\r\n                                    //.WithBadge(0);\r\n                                    alertNotification.Payload.Alert = new AppleNotificationAlert() { Body = iosDeviceToken.SUBJECT };\r\n                                    //service.QueueNotification(alertNotification);\r\n                                    push.QueueNotification(alertNotification);\r\n                                    noOfSuccess++;\r\n\r\n\r\n\r\n                                }\r\n                                catch (Exception ex)\r\n                                {\r\n                                    ErrorLogging.LogError(\"Exception while pushing notification for ios :-\" +ex.Message +\"for device id:-\"+ iosDeviceToken.DEVICE_ID);\r\n                                    response = ex.Message;\r\n                                  \r\n                                }\r\n                            }\r\n                              \r\n                            else\r\n                            {\r\n                                ErrorLogging.LogError(\"Invalid Device Token\");\r\n                                response = \"Invalid Device Token\";\r\n                               \r\n                            }\r\n                         \r\n                        }\r\n                        push.StopAllServices(true);\r\n                    }\r\n                    #endregion Iphone push notification\r\n\r\n\r\nThe above code is used for ios push notification.\r\nBut iam getting error \"The maximum number of Send attempts to send the notification was reached!\"\r\n\r\nCan anyone please help me to sort out this?. It is really a critical issue."}}
{"actor":{"display_login":"suja-balan"}}