Spring Boot Embedded Tomcat Configuration
1 | HTTP Access Logging |
Remote Connection Properties
1 | application.properties |
- server.connection-timeout
Time that connectors wait for another HTTP request before closing the connection. When not set, the connector’s container-specific default is used. Use a value of -1 to indicate infinite timeout.
- server.max-http-header-size
Maximum size of the HTTP message header.
- server.tomcat.accept-count
Maximum queue length for incoming connection requests when all possible request processing threads are in use.
- server.tomcat.max-connections
Maximum number of connections that the server accepts and processes at any given time.
- server.tomcat.max-threads
Maximum amount of worker threads in server under top load. In other words, maximum number of simultaneous requests that can be handled.
- server.tomcat.min-spare-threads
The minimum number of threads always kept running. This includes both active and idle threads.
- server.tomcat.max-swallow-size
The maximum number of request body bytes (excluding transfer encoding overhead) that will be swallowed by Tomcat for an aborted upload. An aborted upload is when Tomcat knows that the request body is going to be ignored but the client still sends it.
If Tomcat does not swallow the body the client is unlikely to see the response. If not specified the default of 2097152 (2 megabytes) will be used. A value of less than zero indicates that no limit should be enforced.
- server.tomcat.max-http-post-size
Maximum size of the HTTP post content.
HTTP Access Logging
1 | application.properties |
- server.tomcat.accesslog.enabled – Enable access logging or not.
- server.tomcat.accesslog.directory – Directory in which log files are created. Can be absolute or relative to the Tomcat base dir.
- server.tomcat.accesslog.file-date-format – Date format to place in the log file name.
- server.tomcat.accesslog.prefix – Log file name prefix.
- server.tomcat.accesslog.suffix – Log file name suffix.
- server.tomcat.accesslog.rotate – Whether to enable access log rotation.