s3 Max retries exceeded Failed to establish a new connection: [Errno 16] Device or resource busy

0

Hello, We are using s3 service to upload file in s3 bucket in php. when we tried to upload a file it gives below error. HTTPSConnectionPool(host=' bucket-name.s3.ap-south-1.amazonaws.com ', port=443): Max retries exceeded with url: /file-path.pdf (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff16336d270>: Failed to establish a new connection: [Errno 16] Device or resource busy'))

please help me why we are facing this issue all of sudden.? what does this mean..? how can i resolved this..? I tried uploading the file using aws cli with same access key and secret key which is mention in the code and i am able to upload successfully. then why i am getting error when using this in code.

1 Answer
1

Based on your description, it is not clear where you PHP app is running. EC2, on-premises, etc?

Was your CLI test from the same server? or from a workstation? Your test seem to take out permissions (IAM/bucket policy) as a cause.

My first thought is that this is network related from the PHP app server to S3. I would examine this and look for changes.

Hope this helps.

profile pictureAWS
EXPERT
iBehr
answered 10 days ago
  • Thanks for your reply, We PHP app is running on ec2 instance. I am able to connect and upload the file from same ec2 instance (where the php app is running ), also i am able to connect & upload data from my local machine using AWS CLI ( same secret key i have used to connect which we are using in app.) It start working when i changed the bucket. There is no network related issue from php app to s3.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions