Trinidad supports monitoring a file to reload applications, when the file
tmp/restart.txt is updated (e.g. touch tmp/restart.txt
), the server reloads
the application the file belongs.
The file monitor can be customized with the monitor
configuration option.
Trinidad now supports 2 reload strategies :
restart (default) synchronous reloading (exposed by Tomcat). This strategy pauses incoming requests while it reloads the application and than serves them once ready (or timeouts if it takes too long). It has been chosen as the default strategy due it's more predictable memory requirements.
rolling "zero-downtime" (asynchronous) reloading strategy similar to Passenger's rolling reloads. This has been the default since 1.1.0 up till now. If you use this you should account that your JVM memory requirements might increase quite a lot since requests are being served while there's another version of your application getting loaded.
Configure the reload strategy per web application or globally e.g. :
--- port: 8080 environment: production reload_strategy: rolling
Trinidad continues to use standard output for server logs by default, it also prints warnings and error messages on error output, while application
specific log messages (e.g. logs from
Rails.logger
) go into the expected file
location at log/{environment}.log.
Application logging performs daily rolling out of the box (similar to Tomcat) and only prints messages from an application to the console while it runs in development mode, that means you won't see any application specific output on the console say in production !
Please note that these logging details as well as the logging format will be configurable with trinidad.yml/.rb within the next 1.4.x release.