SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Update standalone Nginx conf location to better support `--follow` logging over ssl

Open aceysmith opened this issue 1 month ago • 1 comments

If you try to use spacetime logs --follow with a server that is configured for https, the nginx configuration provided (and then subsequently modified by certbot if you enable SSL support), will result in no logs being displayed until the proxy_read_timeout is reached or the proxy_buffer is filled. If you have sporadic logs, this will appear as no logs appearing, timing out after 60 seconds, dumping the logs and then exiting.

The following configuration results in logs appearing immediately and not exiting unless no log is produced in 1 hour instead of only 1 minute.

    # Log streaming benefits from longer read timeout and disabled buffering
    location ~ ^/v1/database/[^/]+/logs$ {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;

        proxy_buffering    off;
        proxy_read_timeout 3600s;
    }

aceysmith avatar Nov 12 '25 21:11 aceysmith

Thank you for filing this!

bfops avatar Nov 13 '25 18:11 bfops