hhmx.de

Föderation · Fr 13.12.2024 23:39:48

@grunfink@comam.es I have a couple little feature requests that I think might slightly improve the usage of with cgi-fcgi on cheap shared hostings:

1) add to server.json an option to configure a folder where to write logs (or at least to save them in a dedicated folder in base dir) instead of standard output. Within such folder, I'd name them after the start date of the server (e.g. snac_2024-12-13.log). When the option is not defined, I'd preserve the current behavior (log to stdout).
2) when running as a server, acquire an advisory lock on the pid, and if you cannot acquire the lock, just exit because someone else is still handling requests for that basedir.

Föderation · Mo 16.12.2024 16:08:38

As for 1) I just noticed the log/ folder that exactly does what I need, sorry for the noise @grunfink@comam.es

2) might still be useful on race conditions, when two different requests to cgi-fcgi find that snac is not running at the same time and both try to start it: we don't want to have two instances of snac racing so the second should happily exits.

Föderation · Mo 16.12.2024 18:56:33

Great. I'll do the advisory lock on the pidfile, I think it's a good measure.

Föderation · Mo 16.12.2024 20:02:41

I've just pushed to the repository a version with pidfile locking; please, confirm if it meets your needs.