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

250
Visualizações
Inconsistently getting net::ERR_TIMED_OUT

I'm hosting a webpage on my server via Apache. From there i'm using jquery.ajax() to request data.

function get_trials() {
$.ajax(
{method:"POST",
url:"https://annotatie01.io.tudelft.nl:80/get_trial",
success: function(response) {

    data = response;
    data_holder = data;
    trials = {};
    for(count=0;count < data_holder['trials'].length;count++)
            {trials[count] = {'meta':{}};
             trials[count]['meta'] = {'url':data_holder['trials'][count][0]};}
    }               
})

}

On the server side i have Flask running.

@app.route('/send_data',methods=['POST'])
def send_data(): # is actually receiving data here
    data = request.json['data']
    print(data)
    write_data_to_database(data)
    return jsonify(reply = 'Ok')

My code appears to be working properly most of the time. Yet, every now and then, for reasons I've not been able to pin-point my server returns ERR_TIMED_OUT. When it does, it'll keep doing so consistently for a while, after which it'll 'work' again. It seems to be somewhat related to using get_trials() from different machines, as it appears to be more likely to return a time-out when calling from different machines. Yet, this is also not consistent, since at other times i can successfully call it from 3 different machines.

When it returns the time-out, the post request is never received by the server.

How can i trace and solve this error?

about 4 years ago · Santiago Trujillo
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