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

152
Visualizações
AWS S3 uploading not working

I'm using the following to upload images to S3. Weirdly, it doesn't even enter the Block. So, no error, no success indication...it simply doesn't return anything at all. I haven't seen this happened before.

    AWSS3TransferManagerUploadRequest *amazonUploadRequest = [AWSS3TransferManagerUploadRequest new];
    amazonUploadRequest.bucket = AWS_PICTURE_BUCKET;
    amazonUploadRequest.body = fileUrl;
    amazonUploadRequest.key = key;
    amazonUploadRequest.contentType = @"image/jpeg";

    AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager];
    [[transferManager upload:amazonUploadRequest] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) {
//Never reaches here.
        if (task.error == nil) {
            completionBlock();
        } else {
            errorBlock(task.error);
        }
        return nil;
    }];

Anyone seen this issue ever? I have used this in the past to upload 1 or 2 images or even 50 images in loop. I am trying right now with 100 right now and it doesn't even execute once.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Found it!

So I was using dispatch_semaphore_t asynchronously for each upload and it turns out GCD has a 64 thread limit and I was hitting that with 100 + uploads. This was making all the uploads wait (DISPATCH_TIME_FOREVER) and hence it seemed like AWS method wasn't responding.

I fixed it by adjusting dispatch_semaphore_t and getting rid of my asynchronous block for individual upload. If you find yourself in this situation, hit the pause button and look for the number of threads running at a time.

Thanks!

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