Failed to connect to the remote server: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Failed to connect to the remote server: cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://my.domain.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery

I enabled exec, and exec_shell in PHP to get this far. It appears to be a configuration issue. I increased script timeout to 1400 seconds in PHP but that does not seem to help. I tried to enable debugging in proxy.php but that doesn’t have an error.

This is on a hosting provider so it could be a PHP configuration or NextCloud configuration.

I would appreciate some help troubleshooting this. I did check the fontconfig and GLIBC libraries and everything looks correct.

Nextcloud Hub 10 (31.0.2)

Collabora Online - Built-in CODE Server Version 24.4.1302, APACHE-licensed

x86_64 GNU/Linux

hii @cbitterfield welcome to collabora online forum

Check if CODE server is reachable

From a shell on the server, try:

curl -v https://my.domain.com/apps/richdocumentscode/proxy.php?req=/hosting/discovery

If that times out from the command line, it’s likely a DNS or firewall issue. If it works from CLI but not from PHP, it’s a PHP networking/config issue.

PHP cURL settings

PHP may have its own limitations, especially with open_basedir, safe_mode, or DNS resolution. Check:

  • php.ini or .user.ini settings:
allow_url_fopen = On
curl.cainfo = /path/to/cacert.pem ; (ensure it exists and is valid)
  • Make sure DNS works in PHP. Create a small test PHP script:
<?php
var_dump(gethostbyname('my.domain.com'));
?>

If that fails, DNS is broken for PHP.