Tried to install OctoberCms using laradock and web installer.
Got 504 Gateway timeout with broken layout:

The mentioned log file does not contain any errors.
After this I entered the php-fpm docker container directly and installed the CMS using console with no issues.
Install the latest OctoberCms with the latest Laradock.
I also have this issue on my local dev version. However, was able to update the production and Staging servers without any issue.
For future reference, this seems to happen only on some local development setups due to various timeout or script execution time defaults not being set long enough for the installation to finish, cf. https://octobercms.com/forum/post/504-gateway-time-out-error-on-unpacking-of-application-files
They're suggesting to change ..\laradock\nginx\sites\default.conf:
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Worked for my setup after a docker-compose restart. Note, depending on your setup you may even have to increase the "300"s even further (for instance if the virtual machine is too slow to unzip things within the time limit).
Theoretically though, I would assume with settings too low this could also happen on hosted services.
The same issue when updating through the backend.
Is it really @GinoPane? What error message are you getting and what server environment are you using?
@LukeTowers it is! Actually, the environment is the same as for installation issue. It's a clean Laradock installation with a tweak to run OctoberCms on Docker. The image has 4 cores and 2 GB of RAM allocated (CPU is i7 7700K).
The error itself is the same as on the screenshot - 504 timeout on unpacking.
If it can be fixed using PHP's max_execution_time, so maybe it would be better to set this limit automatically in installation script (and set it back after complete)?
@LukeTowers
I've investigated it more and fixed it. The reason was in Nginx timeout, not PHP, so it cannot be fixed in runtime through the code. I noticed that all failures were exactly after 60 seconds - the default Nginx timeout. Setting the fastcgi_read_timeout to something bigger did the trick. Now installation and update work fine.
As long as it cannot be fixed in code, we still can add a small note for users, probably. Something like "Unpacking of the archive may take some time. Please make sure to increase server timeout".
It'd be nice if we could detect a timeout during this process and then display a descriptive error message with links to learn more about how to increase the timeout accordingly
@LukeTowers I agree, it would be definitely better, but I didn't manage to find a way to do this (just because PHP itself can not control this timeout). I'll try to investigate this more.
There would have to be something in the client side that detects the HTTP error code for timeouts and displays the appropriate message. It'd be great if you could make a PR for that!
@LukeTowers to be honest, I was thinking about splitting of the core archive into parts and extracting them one by one, so the timeout won't be reached at all 馃槃
But I like your suggestion too, I'll probably look into that.
@LukeTowers I ended up with something like this for now:

The links are to the official Apache and Nginx documentation (timeout-specific sections).
If this looks fine, I'll create a PR to octobercms/install then.
That works great @GinoPane! Could you change the wording to "The operation timed out. Please increase the server's timeout and try again."
That's a much better way to handle it for the users!
@mazzzai no.
The amount of time spent asking for help is directly related to the amount of time spent putting in effort to answer it. If you want help and / or guidance, then invest as much time as possible in making questions that are detailed and easy to understand. Otherwise, nobody is going to invest their time helping with a question that wasn't even worth the askers time to ask correctly.
Most helpful comment
@mazzzai no.
The amount of time spent asking for help is directly related to the amount of time spent putting in effort to answer it. If you want help and / or guidance, then invest as much time as possible in making questions that are detailed and easy to understand. Otherwise, nobody is going to invest their time helping with a question that wasn't even worth the askers time to ask correctly.