Error ipfs.add timeouts and then gives hash

Hello i am using IPFS infura to add file on IPFS , the code was working fine till yesterday but today whenever i try to upload file using ipfs.add , i get timeout exception and also the hash .
the problem here is that timeout exception that i get is not coming in the catch block
so i get a exception and then i get hash also , very weried

Hi Vijayta, welcome to the Infura Community!

Could you provide the code you’re using to send the add request and the error responses you are seeing?

Hello mike ,
the code that i am using is

const IPFS = require(‘ipfs-mini’);

const ipfs = new IPFS({ host: ‘ipfs.infura.io’, port: 5001, protocol: ‘https’ });

ipfs.add(“testing data”).then((result) => {
}));

Thanks are you also getting error responses, can you provide those if so.

502 gateway timeout

it is very random and unpredictable

Can you provide the full error response?

from morning again down getting two types of error

  1. Error: [ipfs-mini] status 500: {“Message”:“open /data/ipfs/blocks/C2/put-902349971: too many open files”,“Code”:0,“Type”:“error”} at exports.XMLHttpRequest.request.onreadystatechange (/srv/node_modules/ipfs-mini/src/index.js:63:20) at exports.XMLHttpRequest.dispatchEvent (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25) at setState (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14) at IncomingMessage. (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickDomainCallback (internal/process/next_tick.js:219:9) more_vert

  2. Error: [ipfs-mini] status 504: 504 Gateway Time-out

    504 Gateway Time-out

    at exports.XMLHttpRequest.request.onreadystatechange (/srv/node_modules/ipfs-mini/src/index.js:63:20) at exports.XMLHttpRequest.dispatchEvent (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25) at setState (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14) at IncomingMessage. (/srv/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickDomainCallback (internal/process/next_tick.js:219:9)

Can you test this again? We made some small changes to our IPFS nodes this morning.

It is working now mike,
but as you see i am facing this random issues since last few days .
sometimes it work , sometimes it doesn’t , we cant rely like this

what is the issue there? and why does it work randomly ?

This is a known issue we are working on addressing a permanent solution. We greatly appreciate your patience and will be releasing major updates to our IPFS service soon.

Do you know when you will have a permanent solution? We just need a timeline because we need this to be consistent for our service. Thank you.

This will depend on your specific use case, but it is possible now to use HTTP Basic Auth when sending your IPFS requests to Infura. If you switch your requests to using a Project ID and Project Secret as HTTP Basic Auth, we can assess your requests and get better information on where you may be seeing issues.