Before you do anything else: ARE YOU SURE THERE IS NO OUTAGE? AI services are still fairly new, they iterate frequently and quickly, and for this reason they tend to have frequent outages. Before you do anything else, please do check whether there's an outage. You'd be surprised at how many issues are down to this trite reason.
Your web server needs to “talk” to your AI service. This involves having Joomla running on your web server make HTTP requests to your AI service's API endpoint. This is fairly standard and mostly works fine, but there are some cases where network issues might cause problems.
If the connection generally works, but generating content seems to fail if the returned content is longer than a trivially small size, you probably have a timeout issue. Please note that AITiny does try to set an infinite PHP time limit and sets a request time limit of ten minutes (600 seconds) for contacting the AI service. However, there are other time limits involved. At the very least, your server's Operating System has a limit on how long a process can work before terminating (ulimit -t). Moreover, your web server usually has a time limit waiting for PHP to return content. If any of these limits is lower than the time required for the AI service to return a response, you get a timeout. You can try asking your host to raise those limits to what you find to be practical for your use case.
If the problem is intermittent and does not fall under the specific case listed above, you must contact your host. That would indicate that their network connectivity is experiencing issues.
If the problem started suddenly, without you or anyone else making any change (do check before you assume that's the case!), please check if the AI service you are using is experiencing any API issues. It is frustrating, but every service on the Internet will have some downtime every now and then.
If you could not make it work at all, ever, start by checking whether your server has the PHP cURL extension installed, and whether cURL supports HTTPS. To do that go to your site's administrator back-end and click on System, Information, System Information. Click on the PHP Information tab. Check if there is a header labeled curl. Find the Protocols line under it and check if the comma-separated list there includes https
. If you do not see the curl header, or the Protocols line does not include https, you will have to contact your host and ask them to please install and enable the curl PHP extension on your site – or give you instructions on how to do that yourself.
If you are using a locally hosted AI service please consult Using a locally hosted AI service. Quick reminders. Do remember that if you are trying to combine a live site with a locally hosted AI service you need tunneling to expose the service to the Internet. Likewise, if your live site is using HTTPS you will need to make sure your AI service tunnel is also using HTTPS.
If you are using a locally hosted or self-hosted AI service which uses HTTPS for its endpoint please keep in mind that your TLS (HTTPS) certificate must have a valid signature (it cannot be self-signed), and its Canonical Name (CN) must match the domain and subdomain of your API endpoint.
If your version of Joomla is more than 2 months old it is possible that its Certification Authority cache (cacert.pem
) file is out-of-date. This may cause come connections made to HTTPS services, like those made to AI services, to fail. The reason is that this file being out of date, Joomla does not know that the TLS certificate used by the AI service has a valid signature if that signature is issued by a Certification Authority that was not part of the now outdated cacert.pem
file. It's the same reason why very old Internet-connected devices which no longer receive updates eventually stop being able to connect to the Internet. Of course, you can download an up-to-date copy of this file from cURL's development site and place it under the libraries/vendor/composer/ca-bundle/res
folder of your site, overwriting the existing file. This will restore connectivity.
If all else fails, the most likely cause is that your host has a firewall or proxy set up on their server which blocks or caches HTTP requests made to external servers. If the request to your AI service is blocked, or its contents are cached, you will experience weird issues. Unfortunately, the only thing you can do is ask your host and hope that the first level tech will understand what you are saying, or decides to escalate it to a more senior second level tech.