PHP Fatal error: Uncaught Exception: Failed connect to; Connection timed out

I am getting a connection timout error when running a PHP script that consumes the API to get cloud recordings. This error is killing the process execution.

This PHP scripts is running as a command line inside a virtual machine.

I am using this code:
$url = ‘’ . $meetingid . ‘/recordings’;
$payload = array(
‘iss’ => $this->apikey,
‘exp’ => time() + 40
$token = \Firebase\JWT\JWT::encode($payload, $this->apisecret);

$curl = curl_init();
$curl_header = array();
$curl_header = 'Authorization: Bearer ’ . $token;
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $curl_header);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);

PHP Fatal error: Uncaught Exception: Failed connect to; Connection timed out

Which App Type (OAuth / Chatbot / JWT / Webhook)?

Which Endpoint/s?
GET /meetings/{meetingId}/recordings

How To Reproduce (If applicable)
After 7000 request to the API endpoint using differents meetingsId i am getting this error (the request rate is 1 per second aprox)

Additional context
This script is part of a massive recordings backup project from a peruvian university.

Hi @eduardo.merino,

Do you run into this error when testing from Postman, cURL, etc?

This sounds like it could be an issue with your PHP configuration. Can you please check out these threads and let me know if it helps:


Hi Will, thanks for your reply

This error is happening on production enviroment when running a PHP file from CLI, it is using cURL.

I don’t think this is an issue with PHP configuration because this same script have been ran on production enviroment 7 times between august and october without trouble.
This error is recent, sometimes happens on request # 7717, # 10314, # 3326, # 7796, # 3200. That’s why we think something on Zoom’s side is blocking the connection.

Hi @eduardo.merino,

Thanks for clarifying. Can you share the exact requests themselves that failed? Please share the request URLs including the Meeting IDs. This will help me take a closer look!


Hi @will.zoom , thanks for your reply.

The following URLs generated the PHP Fatal Error on different runs:

Hey @eduardo.merino,

Thanks for sharing this. In checking our logs, I can see that each of these Meetings were deleted some time back in October, which I believe is why these requests are failing. Is it possible you have a auto-delete turned on under your account for recordings?


Hi @will.zoom

In our code we are handling the case when a meeting doesn’t exists or it doens’t have recordings inside a try/catch block.

On the other hand, we decided to execute the script again today and until now we haven’t seen a connection timeout error yet, even when requesting the URLs posted before. So, is it possible for us to know if some server/connection issues happened on Zoom’s backend between December 10 and 15? (it doesn’t have to be very specific and can be sent to our institutional email address)
We will be asked to write an internal report explaining the delay in our backup process and that information will help us a lot.


Hey @eduardo.merino,

Is it possible to provide the logs for this timeout error? We haven’t had any known issues, but I’m happy to look into it further for you and share these details with our Engineering team.


Hi @will.zoom, thanks for your reply

This is what we captured in our logs (the image has been cut to hide internal files information):

Just to clarify, even when it says “Uncaught Exception” we are actually handling it inside a try/catch block in our code.
Additionally, since yesterday we haven’t seen the connection time out error again and our script is running correctly.

Hey @eduardo.merino,

Thanks for sharing this—is it possible to include logs that include the actual request and timestamp? This would be helpful in order for our team to be able to look into the specific instances of timeouts. Let me know if it’s possible to provide this.


Hi @will.zoom

excuse me, we don’t have logs containing the complete request and it’s timestamp.

Hi @eduardo.merino,

Thanks for clarifying. Without a request example and approximate time to narrow it down, it’s a bit hard to troubleshoot on our end. If you continue to see this issue intermittently, can you take note of the request/time the next time it happens so that we can take a closer look?

Let me know—thanks,

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.