Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

241
Visualizações
Prevent Timeout on Long Running Ajax Request

I have an application which sends an AJAX request to execute some server-side code. This code takes approximately 10 minutes to execute and respond with data.

Both the web server and browser timeout well before this operation completes. What is the best way to structure this request to prevent a gateway timeout?

The ajax request responds with a json object. Is this the correct structure for handling this?

Client executes ajax to start server-side processing
|
|___server working to process data (ETA 10 min)
|  |
|  server finishes and writes file with json object
|
Client recursively ajax requests some endpoint to check for completion
|
|___endpoint returns true
   |
   ajax request for server generated JSON file
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

In the end I decided to use websockets. It seems like if it is a very long operation you can either generate a file and check for that file, or make a real-time app with websockets.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda