Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
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.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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!

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda