Open maxless opened 5 years ago
Are you using mpm prefork mode? It's the only mode that Neko supports. You may reference how we config Apache for the haxelib server in https://github.com/HaxeFoundation/haxelib/blob/development/Dockerfile.
Server Version: Apache/2.4.29 (Ubuntu)
Server MPM: prefork
Server Built: 2019-07-16T18:14:45
Server status page says I do.
From the dockerfile I think that means you use mod_tora explicitly to handle requests:
echo 'LoadModule neko_module /usr/lib/x86_64-linux-gnu/neko/mod_neko2.ndll'; \
echo 'LoadModule tora_module /usr/lib/x86_64-linux-gnu/neko/mod_tora2.ndll'; \
echo 'AddHandler tora-handler .n'; \
I tested it out and, indeed, mod_tora works correctly with reload. But if I add this first line LoadModule neko..., it breaks.
I can confirm this. I have an old project built on mod_neko2
and I see this problem on Ubuntu 18.04 as well.
systemctl reload apache2
is used e.g. by certbot when renewing letsencrypt certs, so this is not so good.
Restart seems to work OK, though.
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2019-09-16T12:58:48
Server MPM: prefork
threaded: no
forked: yes (variable process count)
As a quick fix in my case since it was behind nginx anyways, I've just started tora server in fcgi mode (the git version iirc) and configured nginx to use it to handle index.n and removed Apache altogether, hope that helps.
Thanks, I'll probably do that as well. Normally I use nginx anyway nowadays. I installed apache just because of mod_neko. Does tora run reliably in fcgi mode?
I find it very reliable, yes.
Just make sure you have HaxeFoundation/tora#15 if you care about multipart/form-data
(i.e. use tora from git).
OK, I'll give it a try. Is it possible to use PUT as well with tora?
Sorry about missing this comment @mockey.
From the top of my mind, it should. But I confess to not knowing if there's isn't anyplace that's hardcoded to ignore PUTs. But if there are, they should be easy to fix.
One thing that does come to mind though is that the only streaming API on the Haxe side is parseMultipart
, which IIRC always checks for the suitable verb and headers.
Will try this, thanks.
I ran into this bug again after upgrading an old server. I suppose it won't get fixed, right?
I can't switch to nginx as suggested above. It's quite annoying actually, because apache reload
is used by quite a lot of programs, e.g. logrotate.
Clean Ubuntu 18.04 install with Apache 2.4.29 with mod_neko enabled. Using service reload hangs apache so I have to kill -9 it manually:
Removing mod_neko config files allows the Apache to reload correctly.