Announcement Announcement Module
Collapse
No announcement yet.
504 Gateway timeout Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 504 Gateway timeout

    Hello, I'm not native speaker, so please forgive me for my english in advance
    (btw I used search before asking this, it was unavailable)

    I have simple question, I have Spring MVC app deployed on enterprise cloud which settings I cannot control. It gives me gateway timeout after exactly 120 seconds. Part of controller look like this:

    Code:
    @RequestMapping(value="/listing", method=RequestMethod.POST)
    public ModelAndView function(@ModelAttribute("list") Users users) {
     blabla function filling created Vector...
     ModelAndView mv = new ModelAndView("results");
     mv.addObject("result", someStringResult);
     return mv;
    }
    problem is that function which adds data to Vector, it takes for it long time for proceed and it's from external JAR from repo included in project (not webservice) and I cannot change inputs, it gets provided vector, works with it and give me text result of success or not.

    Do you have any advice how to change timeout from my side, or keep connection alive and notice Nginx that servlet is alive?

    I'm kinda new to Spring and I don't know much about servlets in general, maybe using HttpServletReponse as parameter in funcion and then some workaround with it and flush it to browser repeatedly after 100 seconds maybe? Or somehow create webservice from that function and set timeout for it? (I'm just wondering)
Working...
X