[BUG] Timeout when importing
chrism417 opened this issue · 2 comments
chrism417 commented
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I'm on version 25.02-ls196 and I receive nginx timeouts at 60s when importing a zip file.
I've set the following in /config/nginx/nginx.conf:
client_max_body_size 100m;
client_body_timeout 120s;
send_timeout 300;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
I've also set the following in /config/php/php-local.ini:
max_execution_time = 300
However, I continue to get timeouts at 1m.
Expected Behavior
The import will continue running beyond 1 minute.
Steps To Reproduce
- Upload a 15mb zip file
- Hit validate
- Hit run import
Environment
Docker on MacOS
CPU architecture
x86-64
Docker creation
docker run -d \
--name=bookstack \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e APP_URL= \
-e APP_KEY= \
-e DB_HOST= \
-e DB_PORT=3306 \
-e DB_USERNAME= \
-e DB_PASSWORD= \
-e DB_DATABASE= \
-e QUEUE_CONNECTION= `#optional` \
-p 6875:80 \
-v /path/to/bookstack/config:/config \
--restart unless-stopped \
lscr.io/linuxserver/bookstack:latestContainer logs
/config/log/nginx/error.log:
2025/03/18 09:40:32 [error] 297#297: *62 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: _, request: "POST /import/73 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8088", referrer: "http://localhost:8088/import/73"github-actions commented
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
chrism417 commented
If anyone runs into the same issue, I was able to resolve it by added the following in /config/nginx/site-confs/default.conf (in addition to the updates above):
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
So my full default.conf looks like this:
## Version 2024/07/16 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/nginx/site-confs/default.conf.sample
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
include /config/nginx/ssl.conf;
set $root /app/www/public;
if (!-d /app/www/public) {
set $root /config/www;
}
root $root;
index index.html index.htm index.php;
location / {
# enable for basic auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
try_files $uri $uri/ /index.html /index.htm /index.php$is_args$args;
}
location ~ ^(.+\.php)(.*)$ {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
fastcgi_split_path_info ^(.+\.php)(.*)$;
if (!-f $document_root$fastcgi_script_name) { return 404; }
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
}
# deny access to .htaccess/.htpasswd files
location ~ /\.ht {
deny all;
}
}
