iOS App in background longer than 10 minutes and communicating with Web Service - iphone

I have a app using Location Updates and it can run in the background longer than 10 minutes. This app can communicate with Web Service A both in the background less than and greater than 10 minutes. The problem I'm facing is that it cannot communicate with Web Service B when my app is in the background greater than 10 minutes--I get a 500: internal server error. I can communicate with Web Service B when my app is in the background less than 10 minutes.
Note: I can communicate with Web Service A & B in the foreground as well. Also note that I use the same code/libraries to communicate with Web Service A & B whether they are in the foreground or background.
Has anyone experienced this same problem? Can you please ideas for debugging? Once my Server admin is available I will ask him to analyze the request being received and also check if the socket is being closed prematurely.

I get a 500: internal server error
This hasn't really got anything to do with iOS background services. Your application is running and communicating with the server.
To debug this issue, hook your app up to a proxy like Charles, and look for the difference between requests that succeed and requests that fail.
I suspect your session might be timing out on the server. Look at your server configuration to see if your timeout parameter matches up with what you are observing.

Related

OS X Disable Internal Network Between Apps Temporairly

I am supporting development of a client application that will be communicating to a seperate enterprise service bus. We have our own black box services to develop against. We each host multiple REST endpoints (using RESTeasy) to communicate.
One scenario we need to demonstrate to our client is sudden loss of network connectivity between my client application and their ESB with later network restoration. In the client demonstration, they plan to have separate workstations connected by a router and pull the cables for a few minutes and then reconnect them.
My question is that, while keeping both app running in eclipse on my workstation, can I temporarily block them from making successful REST requests to each other and then restore the connection? As best as possible to simulate the demonstration objective of pulling the network cables.
OS X El Capitan; Eclipse Neon; Jetty 9.2.7
Self Answer:
Not as elegant as I would like, but works because the endpoints are already compile-time configurable.
Add an entry to /etc/hosts for a volatile domain pointing to 127.0.0.1
127.0.0.1 volatileDomain
Configure my endpoints to point to volatileDomain.
Start both apps.
Edit and save /etc/hosts to comment out the volatileDomain line.
Watch disconnection logic handle the current state.
Edit and save /etc/hosts to reintroduce the volatileDomain line.
Watch reconnection logic reestablish the connected state.

500 Error: Failed to establish a backside connection on bluemix java liberty app

I deployed my java web application on Bluemix Dedicated environment and use it with Cloudant Dedicated NoSql DB. In this DB i tried to return 60k documents and server returned
500 Error: Failed to establish a backside connection
to me. So i'm wondering about connection timeout in Bluemix, there're posts where people claim that Bluemix resets a network connection in 120 if there's no response received. Is it possible to change this setting, or maybe someone knows how to solve such problem.
P.S. When I deploy it on my computer then it works fine, but of course it takes some time. Particularly this case may be solved using cloudant pagination, but i develop service for scheduling REST-calls and if bluemix reset all connections after 2 minutes i'll have a big problems with it.
Not sure which Bluemix Dedicated you are using, but the timeout is typically global. Paging would work and I thinking a websocket based approach would work as well.
-r

load balancing wcf service with basichttp binding

I am having a wcf service which is hosted on iis, when 10 to 15 users accessing the service at a time, it is ends with an exception stating httprequesttimedoutwithoutdetails. I have increased the send, receive, open, closed timeout configuration but still in getting the issue. Can anyone please suggest any idea.

Problems with configuration of Bluemix server

I'm trying to increase timeouts in Bluemix. I've set all the timeout settings to 5 min. But after 2 min of a request I got an error:
500 Error: Failed to establish a backside connection
How do I solve this problem?
"This particular message probably comes from the L1 load balancer in Bluemix when it fails to get a timely response from the application it tries to route to. One of the possible cause here is because your application does not send any response back before the load balancer times out, which is 2 minutes if my memory serves me well."
https://developer.ibm.com/answers/questions/25439/bluemix-500-error-failed-to-establish-a-backside-connection-on-web-service-call.html
I would open up a support ticket if you need any additional help.

ClickOnce with a Proxy server (Corporate Firewall), significant delays in checking after .application loaded

Sometimes, when i click on my app link, it takes about 30 seconds before the app starts loading, while it's in the verifying stage. Other times, with the same install, one which i have loaded and used many times, it takes no time at all. Why? What can i change about the deployment to stop this? Please note that i have no admin access to the proxy server, nor possibility of changing the proxy server.
I think this is a performance issue that you need to take up with the guys who support the proxy server. The request is hitting the proxy server and waiting for it to give permission to come through andretrieve the files. It probably depends on how much traffic the server has at any given time.