-
Notifications
You must be signed in to change notification settings - Fork 81
Description
For a long time my app has problems with errors not being logged.
Previously I used the --error-log option. Errors were not written instantly but later on some errors/warnings were written—I often didn’t see the cause when I received HTTP 500 internal server error responses myself. It always seemed like not all errors came through. I think when restarting the service sometimes errors were flushed to the log file but I definitely lost messages for HTTP 500 requests.
ExecStart=/opt/perl5/perlbrew/perls/perl-5.40/bin/starman \
--daemonize \
--error-log /var/log/coocook/starman.log \
--listen /run/coocook/coocook.sock \
--pid /run/coocook/coocook.pid \
/opt/coocook/coocook.psgi
In January 2024 I removed the --error-log option to make Systemd log all the errors and since then the error log has been completely empty. This is increasingly annoying since I am tryig to track down new HTTP 500 responses in production.
ExecStart=/opt/perl5/perlbrew/perls/perl-5.40/bin/starman \
--daemonize \
--listen /run/coocook/coocook.sock \
--pid /run/coocook/coocook.pid \
/opt/coocook/coocook.psgi
The Systemd journal now looks like this repeating over and over again:
# journalctl -u coocook.service
Sep 01 10:09:25 frupa systemd[1]: Starting coocook.service - Coocook run by Starman...
Sep 01 10:09:26 frupa systemd[1]: Started coocook.service - Coocook run by Starman.
Sep 04 07:42:40 frupa systemd[1]: Stopping coocook.service - Coocook run by Starman...
Sep 04 07:42:40 frupa systemd[1]: coocook.service: Deactivated successfully.My app is a quite complex Catalyst app with DBIx-Class that sometimes might print some warning and occasionally emits some exceptions but the PSGI process keeps running. The app is running under Debian with the most recent Perl from Perlbrew with CPAN dists installed into a local-lib dir.
Not sure if this might be related to #65 as I am not using --preload-app.