[SOLVED] Installation fails with request timeout

Hi. I’m trying to use the Web Installer to install Nextcloud on a server at my hosting company.

I uploaded setup-nextcloud.php and ran it. After a while it stopped with this message.

Request Timeout. This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’

Can anyone tell me how to fix it, please? I am the administrator of the website and I don’t know where the connection timeout is set. I can’t find anything in cPanel that looks relevant.

I also looked up how to install Nextcloud manually, but it’s so complicated I doubt if I can manage it.

Hi @tenbob

I fear we would need a bit more information. What stage exactly is that timeout ocurring and what is the full output you get e.g. in your server logs?

Thanks simonspa. I was unable to fix this, even with the help of the sysops at the hosting company. There was no further information in php logs or elsewhere. Just a white screen in the browser with the text shown in my OP. It’s not clear if the message is coming from the Nextcloud software or from the server itself.

Fortunately there was a workaround. The hosting company has a one-click installer for Nextcloud and I was able to use that without any problem.

I spoke too soon. The problem returned when I tried to update from 17.0.2 to 18.0.4 using the built-in updater. After running for a couple of minutes the updater stopped because it couldn’t parse a message sent back from the server. This was the same timeout message shown in my original post.

After a lot of Googling I have now solved the problem and I’m posting here so others can see the solution. The Request timeout message comes from LiteSpeed Web Server on the host. This limits the maximum execution time for any php script to around 120 seconds. Obviously the Nextcloud installation takes much longer, so it fails.

To fix it you can ask the hosting company to change the settings in LiteSpeed.

Admin console->Server->Tuning->Connection Timeout

Or you can do it yourself by setting some environment variables for LiteSpeed in the .htaccess file of your document root. Like this -

<IfModule Litespeed>
SetEnv noabort 1
SetEnv noconntimeout 1
</IfModule>

The information comes from LiteSpeed here. Note that LiteSpeed totally ignores the usual Apache setting below. I wasted a lot of time messing with this.

php_value max_execution_time 60   ##### LiteSpeed ignores this

Hope this helps. Bob

1 Like

This works for me thank you so much for sharing. <3