tinify / tinify-nodejs

Node.js client for the Tinify API.
https://tinypng.com/developers
MIT License
421 stars 74 forks source link

Error: Error while connecting: read ETIMEDOUT #10

Closed huboshu0819 closed 6 years ago

huboshu0819 commented 7 years ago

image

It is very slow even though I upload a small image, and always timeout

emielvanlankveld commented 7 years ago

Hi, thank you for the report!

Would you mind sending us your code snippet to support@tinypng.org? If it always times out we would like to investigate whether this is a consistent issue with the library or if there is a problem with the configuration.

huboshu0819 commented 7 years ago
const tinify = require("tinify");
tinify.key = "xxx";
let pro = tinify.fromFile("./upload/num_bg.png").toFile("./upload/num_bg.min.png");
let start = new Date().getTime();
pro.then((data) =>{
    let end = new Date().getTime();
    console.log('success',end - start);
    console.log(data)
}, (error) =>{
    console.log(error)
})

Today I tried the next, there is no overtime situation, I think it may be a network problem, I will continue to pay attention to this problem and timely feedback

Evertrotshuizen commented 7 years ago

Hi huboshu0819,

As you mentioned, it's most likely a network issue. We are currently in the process of upgrading our infrastructure which should help with these sort of issues. We will definitely let our users know once that upgrade has been released.

If you have any further questions please send them to support@tinypng.com and someone will assist you.

michielverkoijen commented 6 years ago

I am closing this issue as we finished the infrastructure migration.