robbiepaul / cloudconvert-laravel

A Laravel wrapper for the CloudConvert API
177 stars 34 forks source link

Anyone else having issues? All my apps are timing out when we get the mp4 thumbnail #55

Closed chrisbell08 closed 7 years ago

chrisbell08 commented 7 years ago

CloudConvert::file($this->url) ->withOptions([ 'thumbnail_count' => '1', 'thumbnail_size' => '600x315', 'thumbnail_format' => 'jpeg', ])->info();

The above is just timing out. was working fine until a few days ago and has now broken on two separate apps... Think it may be a cloud convert thing. I'm Investigating now....

robbiepaul commented 7 years ago

If it was working until a few days ago I think it must be. I suggest emailing support@cloudconvert.com

chrisbell08 commented 7 years ago

Think they've updated the API,

If you check this process: http://host123d1qm.cloudconvert.com/process/NfTqIaol4OpBSwuJRHvD

It's just sitting at ready.... So the php package keep checking for complete and never gets it then times out.. I can only assume it didn't used to do this?

robbiepaul commented 7 years ago

There's nothing on twitter or their dev blog about updating the API. I'll do some more investigating tonight.

chrisbell08 commented 7 years ago

OK. Will update if I find anything (Have noticed the "Ready" thing was my fault from fiddling around trying to get it working I had changed the start conversion post request to a get one hence it not starting)

chrisbell08 commented 7 years ago

OK to just update on the exact issue here. The second post request that starts the process is timing out if I dump out the opts (see below) and do the post via postman manually it seems to work..

guzzle6Adapter.php

  public function post($url, $params = [], $query = null)
    {
        $body = is_array($query) && is_array($params)  ? array_merge($params, $query) : $params;

        $opts = [ 'json' =>  $body  ];

        if(isset($body['file']) && is_resource($body['file']))  {
            return $this->multipart($url, $body);
        }

        try {
            // findme
            $urLArray = explode('/',$url);

            if (count($urLArray) === 5) {
                dd( $url, $opts );
            }
            $this->response = $this->client->post($url,  $opts);
        } catch (\Exception $e) {
            throw $e;
        }

        return $this->returnJsonResponse();
    }
chrisbell08 commented 7 years ago

Ok so pretty sure this is a cloud convert issue and I can replicate the issue when manually doing the POST via postman (It's not returning anything from the second post request until it's finished, last one took over 40seconds)

Will close the issue and follow up with CC. :)

robbiepaul commented 7 years ago

Thanks @chrisbell08 glad you're getting somewhere. Let me know how you get on just incase someone else runs in to the same issue

chrisbell08 commented 7 years ago

I'm at a bit of a loss with this.... Cloud Convert say the "wait" param means it doesn't send a response back until it's finished so now basically nginx is timing out (My postman request took 40 seconds to receive a response). My app has been live since last august with no issues so something must have changed somewhere...