Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by Deepak.Lathika@ge.com · Aug 29, 2017 at 12:28 AM · predix cloudspring-boothttp

Not getting httpresponse back in restful after 2.5 minutes

Hi,

We have a springboot backend app which takes in an excel file around 100 MB through REST call, parses the excel and stored in postgres db.

Now this backend app worked when we ran using sts in local. We used to call the api through postman and through UI and was returning a valid httpresponse back.The whole process will take atleast around 2.5 mins and above.

But when this app was deployed to Predix, while testing the API using Postman / UI, the backend springboot app wasnt sending any response back (neither to Postman nor to UI).

Is there any default timeout for https calls in predix? Also, PFB the manifest file regarding memory (have increased the memory to the below specifications else the app will crash) :

applications: - buildpack: java_buildpack memory: 5G disk_quota: 1G name: path: target/-1-SNAPSHOT.jar # services: # - env: MEMORY_LIMIT: 4G

PS : we want it as restful call itself. So dont require a websocket suggestion :)

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Siva Balan · Aug 29, 2017 at 08:51 AM

Below is a snippet from AWS ELB documentation at http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#connection-idle-timeout

By default, Elastic Load Balancing sets the idle timeout value to 60 seconds. Therefore, if the target doesn't send some data at least every 60 seconds while the request is in flight, the load balancer can close the front-end connection. To ensure that lengthy operations such as file uploads have time to complete, send at least 1 byte of data before each idle timeout period elapses, and increase the length of the idle timeout period as needed.

So you have to device a mechanism to keep the connection busy until the upload completes in 2.5mins.

Comment
Add comment · Show 9 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Deepak.Lathika@ge.com · Aug 29, 2017 at 11:47 PM 0
Share

Hello SIva ,

Thanks for the response. Our app is deployed in US-WEST region and i believe that our gateway is through AWS. So is there a way to only increase the idle-timeout only for our specific app through cf commands or anything ?

avatar image Siva Balan ♦ Deepak.Lathika@ge.com · Aug 30, 2017 at 08:59 AM 0
Share

Unfortunately it cannot be done per app. Its a global timeout setting. There is no way to control the ELB idle timeout settings from your app.

avatar image Deepak.Lathika@ge.com Siva Balan ♦ · Aug 30, 2017 at 10:14 AM 0
Share

yeah thought so :)

avatar image Deepak.Lathika@ge.com · Aug 30, 2017 at 07:13 AM 0
Share

Also, i believe only the Predix Admin has access to alter these right ?

I would appreciate, if you can suggest some other alternative to this through cf or through app.

PS : this is a Springboot microservice app deployed in Predix

avatar image Siva Balan ♦ Deepak.Lathika@ge.com · Aug 30, 2017 at 09:00 AM 1
Share

Yes, you are correct. I have asked a few experts to bounce some ideas. You should get some updates on this post if they have any ideas.

avatar image Deepak.Lathika@ge.com Siva Balan ♦ · Aug 30, 2017 at 10:15 AM 0
Share

Great thanks

avatar image Greg Stroup ♦ Deepak.Lathika@ge.com · Aug 30, 2017 at 09:58 AM 1
Share

Hahah, I was almost going to suggest a web socket solution, until I saw your last line. :)

But in general, most web applications should not have any requests that take so long to return. It's a bad experience for users, and many systems in the stack will probably time out. (browser, web server, microservice, load balancer, etc.)

Without using a websocket, I'd suggest trying to break down your 2.5 minute process into smaller functions. Maybe one step would be just "upload". Then respond to the client with a message, and some kind of process ID. Maybe parsing the xls file is another step. Maybe storing in postgres is another step. At each step, you can communicate to the user what's happening. This could be done in various ways, either a message queue (pub/sub) pattern, or simply have your browser make another HTTP request every 5 or 10 seconds to check the status of the upload process. Hope this helps.

avatar image Deepak.Lathika@ge.com Greg Stroup ♦ · Aug 30, 2017 at 10:14 AM 0
Share

Hello Greg, yes i was thinking of this. But the funny part is this requirement would be for a specific admin. Moreover, they want the admin to wait.. haha :)

Thanks for suggesting anyways :)

avatar image Deepak.Lathika@ge.com Greg Stroup ♦ · Aug 30, 2017 at 10:16 AM 0
Share

Moreover, all this limitation came in after we uploaded to Predix as it was working fine in local. Later on noticed this .

We have some limited time to develop so trying some basic alternatives.

Follow this Question

Answers Answers and Comments

60 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Call from SpringBoot Application to SpringBoot Application failing in Predix 1 Answer

Azure Application endpoint is not Accessible in Predix Cloud application 1 Answer

Error restarting application: Start app timeout TIP: Application must be listening on the right port. Instead of hard coding the port, use the $PORT environment variable. 3 Answers

Getting " No qualifying bean of type [javax.sql.DataSource] is defined: expected single matching bean but found 2" while deploying to Predix 1 Answer

Spring boot app Request Timesout After 1 minute 1 Answer

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests